mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
tree-optimization/109410 - ICE with noreturn and -g
This fixes the -g variant of the original testcase. PR tree-optimization/109410 * tree-ssa-reassoc.cc (build_and_add_sum): Use gsi_start_nondebug_after_labels_bb to look for a possible returns-twice call. * gcc.dg/pr109410-2.c: New testcase.
This commit is contained in:
5
gcc/testsuite/gcc.dg/pr109410-2.c
Normal file
5
gcc/testsuite/gcc.dg/pr109410-2.c
Normal file
@@ -0,0 +1,5 @@
|
||||
/* PR tree-optimization/109410 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -g" } */
|
||||
|
||||
#include "pr109410.c"
|
||||
@@ -1568,7 +1568,8 @@ build_and_add_sum (tree type, tree op1, tree op2, enum tree_code opcode)
|
||||
if ((!op1def || gimple_nop_p (op1def))
|
||||
&& (!op2def || gimple_nop_p (op2def)))
|
||||
{
|
||||
gsi = gsi_after_labels (single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
|
||||
gsi = gsi_start_nondebug_after_labels_bb
|
||||
(single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
|
||||
if (!gsi_end_p (gsi)
|
||||
&& is_gimple_call (gsi_stmt (gsi))
|
||||
&& (gimple_call_flags (gsi_stmt (gsi)) & ECF_RETURNS_TWICE))
|
||||
|
||||
Reference in New Issue
Block a user