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
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
loop1.C
blob
3380dd4d74d305c44440a2cdeca56a9e2b412fe1
1
// Test for bad loop optimization of goto fixups.
2
// Special g++ Options: -O2
3
4
typedef bool (*ftype) ();
5
6
int c, d;
7
struct A {
8
A() { ++c; }
9
A(const A&) { ++c; }
10
~A() { ++d; }
11
};
12
13
void f (ftype func)
14
{
15
A a;
16
do {
17
if ((*func)()) return;
18
} while (true);
19
}
20
21
bool test ()
22
{
23
return true;
24
}
25
26
main ()
27
{
28
f (test);
29
return (c != d);
30
}