Debian Codegraph @

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

raw
1 void abort (void);
2 void exit (int);
3
4 struct s { char *p; int t; };
5
6 extern void bar (void);
7 extern void foo (struct s *);
8
9 int main(void)
10 {
11 bar ();
12 bar ();
13 exit (0);
14 }
15
16 void
17 bar (void)
18 {
19 foo (& (struct s) { "hi", 1 });
20 }
21
22 void foo (struct s *p)
23 {
24 if (p->t != 1)
25 abort();
26 p->t = 2;
27 }