* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr49886.c
blob9e9ceb2629435cb24690c3474be8e2f49384d094
1 struct PMC {
2 unsigned flags;
3 };
5 typedef struct Pcc_cell
7 struct PMC *p;
8 long bla;
9 long type;
10 } Pcc_cell;
12 int gi;
13 int cond;
15 extern void abort ();
16 extern void never_ever(int interp, struct PMC *pmc)
17 __attribute__((noinline,noclone));
19 void never_ever (int interp, struct PMC *pmc)
21 abort ();
24 static void mark_cell(int * interp, Pcc_cell *c)
25 __attribute__((__nonnull__(1)));
27 static void
28 mark_cell(int * interp, Pcc_cell *c)
30 if (!cond)
31 return;
33 if (c && c->type == 4 && c->p
34 && !(c->p->flags & (1<<18)))
35 never_ever(gi + 1, c->p);
36 if (c && c->type == 4 && c->p
37 && !(c->p->flags & (1<<17)))
38 never_ever(gi + 2, c->p);
39 if (c && c->type == 4 && c->p
40 && !(c->p->flags & (1<<16)))
41 never_ever(gi + 3, c->p);
42 if (c && c->type == 4 && c->p
43 && !(c->p->flags & (1<<15)))
44 never_ever(gi + 4, c->p);
45 if (c && c->type == 4 && c->p
46 && !(c->p->flags & (1<<14)))
47 never_ever(gi + 5, c->p);
48 if (c && c->type == 4 && c->p
49 && !(c->p->flags & (1<<13)))
50 never_ever(gi + 6, c->p);
51 if (c && c->type == 4 && c->p
52 && !(c->p->flags & (1<<12)))
53 never_ever(gi + 7, c->p);
54 if (c && c->type == 4 && c->p
55 && !(c->p->flags & (1<<11)))
56 never_ever(gi + 8, c->p);
57 if (c && c->type == 4 && c->p
58 && !(c->p->flags & (1<<10)))
59 never_ever(gi + 9, c->p);
62 static void
63 foo(int * interp, Pcc_cell *c)
65 mark_cell(interp, c);
68 static struct Pcc_cell *
69 __attribute__((noinline,noclone))
70 getnull(void)
72 return (struct Pcc_cell *) 0;
76 int main()
78 int i;
80 cond = 1;
81 for (i = 0; i < 100; i++)
82 foo (&gi, getnull ());
83 return 0;
87 void
88 bar_1 (int * interp, Pcc_cell *c)
90 c->bla += 1;
91 mark_cell(interp, c);
94 void
95 bar_2 (int * interp, Pcc_cell *c)
97 c->bla += 2;
98 mark_cell(interp, c);