repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.eh
/
ptr1.C
blob
aefe5cc618ed7be009344599d2b4b240b12ae08a
1
// { dg-do run }
2
// Bug: catching pointers by reference doesn't work right.
3
4
extern "C" int printf (const char *, ...);
5
6
struct E {
7
int x;
8
E(int i) { x = i; }
9
};
10
11
int main()
12
{
13
try {
14
E *p = new E(5);
15
throw p;
16
}
17
18
catch (E *&e) {
19
printf ("address of e is 0x%lx\n", (__SIZE_TYPE__)e);
20
return !((__SIZE_TYPE__)e != 5 && e->x == 5);
21
}
22
return 2;
23
}