Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr26840.c
blob8d864a295d879bf5df6e78f1f621fddb185374b4
1 extern int f1 (void **);
2 extern void f2 (void *);
4 struct s
6 unsigned char field1;
7 int field2;
8 };
10 static inline struct s *
11 get_globals (void)
13 struct s * r;
14 void * rr;
16 if (f1 (&rr))
17 return 0;
18 r = rr;
19 if (! r)
21 extern struct s t;
22 r = &t;
24 r->field1 = 1;
25 return r;
28 void
29 atexit_common (const void *dso)
31 struct s *g = get_globals ();
33 if (! g)
34 return;
35 if (g->field1)
37 g->field2 = 0;
38 f2 (g);
40 else
41 f2 (g);