Rebase.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr55253.c
blob9f6491d4ca4d7fa1211e647df5c7ca3d29cbb004
1 /* { dg-do run } */
3 struct
5 int mallocFailed;
7 *a;
9 struct StrAccum
11 int useMalloc;
13 b, c;
15 static void
16 fn1 (struct StrAccum *p1, int p2)
18 if (p2 == 0)
19 return;
20 if (p1->useMalloc)
21 a->mallocFailed = 0;
24 void
25 fn2 (struct StrAccum *p1)
27 fn1 (p1, 1);
30 void
31 fn3 (struct StrAccum *p1)
33 fn1 (p1, 1);
36 void
37 fn4 ()
39 c.useMalloc = 1;
40 fn1 (&c, 0);
43 int
44 main ()
46 fn3 (&b);
47 return 0;