[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-25 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:cc74832213ba1fc7abe402573a0b381e1c404df0

commit r10-6225-gcc74832213ba1fc7abe402573a0b381e1c404df0
Author: Jakub Jelinek 
Date:   Sun Jan 26 00:32:01 2020 +0100

testsuite: Fix up pr92788.C FAIL on ia32.

2020-01-26  Jakub Jelinek  

PR tree-optimization/92788
* g++.dg/pr92788.C: Move to ...
* g++.target/i386/pr92788.C: ... here.  Remove target from dg-do line.
Change type of operator new's first parameter to __SIZE_TYPE__.

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-24 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jeffrey A. Law  ---
Should be fixed on the trunk.

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-24 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Jeff Law :

https://gcc.gnu.org/g:98181563dc4c65c9d23eaa99134e18876b6ec671

commit r10-6217-g98181563dc4c65c9d23eaa99134e18876b6ec671
Author: Jeff Law 
Date:   Fri Jan 24 17:44:10 2020 -0500

Fix ICE due to invalid jump threading request

PR tree-optimization/92788
* tree-ssa-threadedge.c (thread_across_edge): Check EDGE_COMPLEX
not EDGE_ABNORMAL.

PR tree-optimization/92788
* g++.dg/pr92788.C: New test.

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-24 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

--- Comment #6 from Jeffrey A. Law  ---
We shouldn't have threaded this to begin with.  I think I see what went wrong
here.

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-24 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com
   Assignee|unassigned at gcc dot gnu.org  |law at redhat dot com

--- Comment #5 from Jeffrey A. Law  ---
Given this mess is my code, I'll take it.

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

--- Comment #4 from Jakub Jelinek  ---
The problem is exactly in the EH edge purging being delayed, if it would be
done before thread_through_all_blocks, then it might work.  But not sure if the
edge purging doesn't invalidate something that thread_through_all_blocks relies
on (and we'd need to repeat the EH edge purging after
thread_through_all_blcoks).

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2020-01-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

--- Comment #3 from Richard Biener  ---
delay the EH edge purging?  Guess then the EH edge redirect will complain
because there's no stmt throwing...

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2019-12-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

--- Comment #2 from Jakub Jelinek  ---
So, what happens is that we have a bb like:
 [local count: 7102878]:
# __result_2 = PHI <_10(3)>
*this_4(D).D.3185._M_impl.D.3135._M_finish = __result_2;
with EH and normal successor edges.
dom_opt_dom_walker::optimize_stmt decides to remove the stmt (the only one in
the bb):
2160  if (cached_lhs && operand_equal_p (rhs, cached_lhs, 0))
2161{
2162  basic_block bb = gimple_bb (stmt);
2163  unlink_stmt_vdef (stmt);
2164  if (gsi_remove (si, true))
2165{
2166  bitmap_set_bit (need_eh_cleanup, bb->index);
2167  if (dump_file && (dump_flags & TDF_DETAILS))
2168fprintf (dump_file, "  Flagged to clear EH
edges.\n");
2169}
2170  release_defs (stmt);
2171  *removed_p = true;
2172  return retval;
2173}
but before we perform
780   /* Removal of statements may make some EH edges dead.  Purge
781  such edges from the CFG as needed.  */
782   if (!bitmap_empty_p (need_eh_cleanup))
...
to clean up those EH edges,
774   /* Thread jumps, creating duplicate blocks as needed.  */
775   cfg_altered |= thread_through_all_blocks (may_peel_loop_headers_p);
is called, calls thread_block_1 on the bb 13 and ICE trying to redirect EH edge
on a copy of that BB, because for EH edges we obviously assume there is some
statement that can throw but there are no statements in the bb at all.
Not really sure what can be done here.

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2019-12-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-12-04
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2019-12-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug tree-optimization/92788] [10 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2313

2019-12-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92788

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Started with r272922, guess latent before.  I'll have a look.