PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / 20100906-1.c
blob042ba99c5345344acc2318bdf8f003ae3258353e
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 /* { dg-options "-O2 -fno-short-enums -Wl,--no-enum-size-warning" {target arm_eabi} } */
5 /* This testcase got misoptimized by combine due to a wrong setting of
6 subst_low_luid in try_combine. */
8 enum rtx_code {
9 A, B
12 void abort (void);
14 struct rtx_def {
15 __extension__ enum rtx_code code:16;
17 typedef struct rtx_def *rtx;
19 void __attribute__((noinline))
20 add_constraint (unsigned char is_a)
22 if (is_a)
23 abort ();
26 void __attribute__((noinline))
27 foo (rtx defn)
29 switch (defn->code)
31 case A:
32 case B:
33 add_constraint (defn->code == A);
34 break;
35 default:
36 break;
40 int
41 main ()
43 struct rtx_def r;
45 r.code = B;
47 foo (&r);
48 return 0;