Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20020418-1.c

raw
1 /* ifcvt accidentally deletes a referenced label while generating
2 conditional traps on machines having such patterns */
3
4 void exit (int);
5
6 struct foo { int a; };
7
8 void gcc_crash(struct foo *p)
9 {
10 if (__builtin_expect(p->a < 52, 0))
11 __builtin_trap();
12 top:
13 p->a++;
14 if (p->a >= 62)
15 goto top;
16 }
17
18 int main(void)
19 {
20 struct foo x;
21
22 x.a = 53;
23 gcc_crash(&x);
24
25 exit (0);
26 }