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