Be careful about comdat boundary in ICF (PR ipa/82352).
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr80436.C
blobb269b75b9b402695ea59c6f6d779cdcf2f00cc2c
1 // PR debug/80436
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-O3 -fcompare-debug" }
4 // { dg-xfail-if "" { powerpc-ibm-aix* } }
6 void fn (...);
7 void foo (int, int, int);
8 struct { int elt1; int bits; } *a;
9 int b, d;
11 int
12 bar (unsigned *x)
14   if (0)
15   next_bit:
16     return 1;
17   while (1)
18     {
19       if (b)
20         if (a->bits)
21           goto next_bit;
22       *x = b;
23       if (a->elt1)
24         return 0;
25       a = 0;
26     }
29 enum { C0, C1 } *c;
31 void
32 baz ()
34   int e, m = d;
35   for (; e < m; e++)
36     {
37       if (e < 0)
38         foo (0, 0, c[e]);
39       unsigned f;
40       for (; bar (&f);)
41         fn (f);
42     }