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
new
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.eh
/
ptr1.C
blob
224952655ba99729c06a4eab4df107099257eb24
1
// Bug: catching pointers by reference doesn't work right.
2
3
extern "C" int printf (const char *, ...);
4
5
struct E {
6
int x;
7
E(int i) { x = i; };
8
};
9
10
int main()
11
{
12
try {
13
E *p = new E(5);
14
throw p;
15
}
16
17
catch (E *&e) {
18
printf ("address of e is 0x%x\n", (long)e);
19
return !(long(e) != 5 && e->x == 5);
20
}
21
return 2;
22
}