https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78229

            Bug ID: 78229
           Summary: [6/7 Regression]  ICE in redirect_eh_edge_1, at
                    tree-eh.c:2305
           Product: gcc
           Version: 6.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with gcc-6-branch 20161103 r241817, works with -O1 instead of -O2, test
case extracted from blender 2.77:

$ g++ -mavx -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mf16c -c -O2 -fopenmp -fPIC
-funsigned-char -fno-strict-aliasing -ffast-math kernel_avx2.ii
kernel_avx2.ii: In function 'void fn3()':
kernel_avx2.ii:8:6: internal compiler error: in redirect_eh_edge_1, at
tree-eh.c:2305
 void fn3() {
      ^~~
Please submit a full bug report,
with preprocessed source if appropriate.

$ cat kernel_avx2.ii
void a();
inline int b(int c) {
  int d = c;
  return __builtin_ia32_tzcnt_u32(d);
}
struct e {};
int f, g, h;
void fn3() {
  float j;
  &j;
  {
    e k;
    while (h) {
      if (g == 0)
        continue;
      int i = b(g);
      f = i;
    }
    a();
  }
}

Reply via email to