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

            Bug ID: 72810
           Summary: [7 Regression] error: type mismatch for case label in
                    switch statement
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 Release % cat recover.i
typedef int a;
int b;
void c(a d) {
  switch (d)
  case 0:
  case 910:
  case 1:
    while (1) {
      if (b == 0)
        return;
      c(b);
    }
}

markus@x4 Release % gcc -O3 -c recover.i
recover.i: In function ā€˜c’:
recover.i:3:6: error: type mismatch for case label in switch statement
 void c(a d) {
      ^
case 910:
switch (b.0_1) <default: <L65>, case 1: <L35>, case 910: <L35>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L64>, case 1: <L63>, case 910: <L63>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L63>, case 1: <L62>, case 910: <L62>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L62>, case 1: <L61>, case 910: <L61>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L61>, case 1: <L60>, case 910: <L60>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L60>, case 1: <L59>, case 910: <L59>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L59>, case 1: <L58>, case 910: <L58>>
recover.i:3:6: error: type mismatch for case label in switch statement
case 910:
switch (b.0_15) <default: <L58>, case 1: <L75>, case 910: <L75>>
recover.i:3:6: internal compiler error: verify_gimple failed
0xbcd806 verify_gimple_in_cfg(function*, bool)
        ../../gcc/gcc/tree-cfg.c:5212
0xab81f3 execute_function_todo
        ../../gcc/gcc/passes.c:1964
0xab8bab execute_todo
        ../../gcc/gcc/passes.c:2016
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to