Debian Codegraph @

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

raw
1 /* { dg-additional-options "-std=gnu89" } */
2
3 typedef struct rtx_def
4 {
5 int f1 :1;
6 int f2 :1;
7 } *rtx;
8
9 static rtx
10 f (orig)
11 register rtx orig;
12 {
13 if (orig->f1 || orig->f2)
14 return orig;
15 orig->f2 = 1;
16 return orig;
17 }
18
19 void
20 f2 ()
21 {
22 abort ();
23 }
24
25 main ()
26 {
27 struct rtx_def foo;
28 rtx bar;
29
30 foo.f1 = 1;
31 foo.f2 = 0;
32 bar = f (&foo);
33 if (bar != &foo || bar->f2 != 0)
34 abort ();
35 exit (0);
36 }