PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr43835.c
blob97237f6253883f360809e997231c98dd2767405f
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 extern void abort ();
13 extern void Parrot_gc_mark_PMC_alive_fun(int * interp, struct PMC *pmc)
14 __attribute__((noinline));
16 void Parrot_gc_mark_PMC_alive_fun (int * interp, struct PMC *pmc)
18 abort ();
21 static void mark_cell(int * interp, Pcc_cell *c)
22 __attribute__((__nonnull__(1)))
23 __attribute__((__nonnull__(2)))
24 __attribute__((noinline));
26 static void
27 mark_cell(int * interp, Pcc_cell *c)
29 if (c->type == 4 && c->p
30 && !(c->p->flags & (1<<18)))
31 Parrot_gc_mark_PMC_alive_fun(interp, c->p);
34 void foo(int * interp, Pcc_cell *c);
36 void
37 foo(int * interp, Pcc_cell *c)
39 mark_cell(interp, c);
42 int main()
44 int i;
45 Pcc_cell c;
46 c.p = 0;
47 c.bla = 42;
48 c.type = 4;
49 foo (&i, &c);
50 return 0;