1 /* Verify that IPA-CP can clone mark_cell without miscompiling it despite its
4 /* { dg-options "-O3 -fdump-ipa-cp" } */
11 typedef struct Pcc_cell
21 extern void never_ever(int * interp
, struct PMC
*pmc
)
22 __attribute__((noinline
));
24 void never_ever (int * interp
, struct PMC
*pmc
)
29 static void mark_cell(int * interp
, Pcc_cell
*c
)
30 __attribute__((__nonnull__(1)))
31 __attribute__((noinline
));
34 mark_cell(int * interp
, Pcc_cell
*c
)
36 if (c
&& c
->type
== 4 && c
->p
37 && !(c
->p
->flags
& (1<<14)))
38 never_ever(interp
, c
->p
);
41 static void foo(int * interp
, Pcc_cell
*c
)
42 __attribute__((noinline
));
45 foo(int * interp
, Pcc_cell
*c
)
50 static struct Pcc_cell
*
51 __attribute__((noinline
,noclone
))
54 return (struct Pcc_cell
*) 0;
62 for (i
= 0; i
< 100; i
++)
63 foo (&gi
, getnull ());
68 /* { dg-final { scan-ipa-dump "Creating a specialized node of mark_cell" "cp" } } */
69 /* { dg-final { cleanup-ipa-dump "cp" } } */