[PR rtl-optimization/115877][6/n] Add testcase from pr115877
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20040625-1.c
blob0cb66a84f5d001bb6d5d23cd1729064b8684df2b
1 /* From PR target/16176 */
2 void abort (void);
3 void exit (int);
5 struct __attribute__ ((packed)) s { struct s *next; };
7 struct s * __attribute__ ((noinline))
8 maybe_next (struct s *s, int t)
10 if (t)
11 s = s->next;
12 return s;
15 int main ()
17 struct s s1, s2;
19 s1.next = &s2;
20 if (maybe_next (&s1, 1) != &s2)
21 abort ();
22 exit (0);