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

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Here's a smaller test case:

$ cat t.C && gcc -O1 -S -Wall t.C
extern "C" int snprintf (char *, __SIZE_TYPE__, const char *, ...);

int foo ()
{
  try {
    return snprintf (0, 0, "");
  } catch (...) { }
}
t.C: In function ‘int foo()’:
t.C:6:30: warning: zero-length gnu_printf format string [-Wformat-zero-length]
     return snprintf (0, 0, "");
                              ^
t.C:8:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
t.C:3:5: error: dead STMT in EH table
 int foo ()
     ^~~
# .MEM_3 = VDEF <.MEM_2(D)>
_4 = snprintf (0B, 0, "");
t.C:3:5: internal compiler error: verify_gimple failed
0x1194b67 verify_gimple_in_cfg(function*, bool)
        /src/gcc/git/gcc/tree-cfg.c:5266
0x1023a92 execute_function_todo
        /src/gcc/git/gcc/passes.c:1965
0x1022b1d do_per_function
        /src/gcc/git/gcc/passes.c:1649
0x1023c64 execute_todo
        /src/gcc/git/gcc/passes.c:2015
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