Debian Codegraph @

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

raw
1 /* From PR target/16176 */
2 void abort (void);
3 void exit (int);
4
5 struct __attribute__ ((packed)) s { struct s *next; };
6
7 struct s * __attribute__ ((noinline))
8 maybe_next (struct s *s, int t)
9 {
10 if (t)
11 s = s->next;
12 return s;
13 }
14
15 int main ()
16 {
17 struct s s1, s2;
18
19 s1.next = &s2;
20 if (maybe_next (&s1, 1) != &s2)
21 abort ();
22 exit (0);
23 }