This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83293] [8 regression] ICE: in gsi_insert_seq_nodes_after, at gimple-iterator.c:278
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 06 Dec 2017 09:19:07 +0000
- Subject: [Bug tree-optimization/83293] [8 regression] ICE: in gsi_insert_seq_nodes_after, at gimple-iterator.c:278
- Auto-submitted: auto-generated
- References: <bug-83293-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83293
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 42799
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42799&action=edit
gcc8-pr83293.patch
Untested fix. The gsi is unused afterwards, but we don't have a GSI_DONT_CARE
and GSI_SAME_STMT is invalid if the bb was empty and we gsi_insert_after with
GSI_SAME_STMT. Another possibility would be to change
if (!gsi_end_p (gsi) && stmt_ends_bb_p (gsi_stmt (gsi)))
to
if (gsi_end_p (gsi) || stmt_ends_bb_p (gsi_stmt (gsi)))