[Bug tree-optimization/41377] [4.5 Regression] gimple EH rewrite causes ICE with PPRE (enabled at -O3)

2009-10-13 Thread rth at gcc dot gnu dot org


--- Comment #7 from rth at gcc dot gnu dot org  2009-10-13 18:45 ---
Fixed.


-- 

rth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41377



[Bug tree-optimization/41377] [4.5 Regression] gimple EH rewrite causes ICE with PPRE (enabled at -O3)

2009-10-13 Thread rth at gcc dot gnu dot org


--- Comment #6 from rth at gcc dot gnu dot org  2009-10-13 18:42 ---
Subject: Bug 41377

Author: rth
Date: Tue Oct 13 18:41:56 2009
New Revision: 152728

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152728
Log:
PR tree-optimization/41377
* tree-eh.c (unsplit_eh): Propagate degenerate PHIs.
(cleanup_empty_eh_merge_phis): New change_region parameter;
pass it on to redirect_eh_edge_1.  Update callers.
(cleanup_empty_eh_unsplit): Don't require an existing EH label
at the destination block.

Added:
trunk/gcc/testsuite/g++.dg/opt/eh5.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-eh.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41377



[Bug tree-optimization/41377] [4.5 Regression] gimple EH rewrite causes ICE with PPRE (enabled at -O3)

2009-10-12 Thread rth at gcc dot gnu dot org


--- Comment #5 from rth at gcc dot gnu dot org  2009-10-12 22:34 ---
Mine.


-- 

rth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-10-05 00:09:08 |2009-10-12 22:34:01
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41377



[Bug tree-optimization/41377] [4.5 Regression] gimple EH rewrite causes ICE with PPRE (enabled at -O3)

2009-10-11 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-10-11 12:05 ---
ehcleanup does not deal with the virtual PHI node appearing in BB13:

  # BLOCK 11 freq:4067
  # PRED: 10 [100.0%]  (fallthru,exec)
  D.2166_92 = (int *) D.2165_108;
  # .MEM_148 = VDEF <.MEM_106>
  D.2148_59 = A::foo (&a, D.2166_92);
  # SUCC: 12 [100.0%]  (fallthru,exec) 13 (eh,exec)

...

  # BLOCK 13
  # PRED: 11 (eh,exec)
  # .MEM_44 = PHI <.MEM_148(11)>
:
  goto  ();
  # SUCC: 27 [100.0%]  (fallthru,exec)

...

  # BLOCK 27
  # PRED: 13 [100.0%]  (fallthru,exec) 26 [100.0%]  (fallthru,exec)
  # .MEM_138 = PHI <.MEM_44(13), .MEM_60(26)>
:
  # .MEM_19 = VDEF <.MEM_138>
  operator delete (D.1857_5);
  resx 3
  # SUCC:

as the comment suggests this should be easy to fix.  Honza?

#1  0x0880ed28 in unsplit_eh (lp=0xb7d6c0c0)
at /home/richard/src/trunk/gcc/tree-eh.c:3389
3389  gcc_assert (gimple_seq_empty_p (phi_nodes (bb)));
(gdb) l
3384  /* ??? I can't imagine there would be PHI nodes, since by nature
3385 of critical edge splitting this block should never have been
3386 a dominance frontier.  If cfg cleanups somehow confuse this,
3387 due to single edges in and out we ought to have degenerate PHIs
3388 and can easily propagate the PHI arguments.  */
3389  gcc_assert (gimple_seq_empty_p (phi_nodes (bb)));


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41377



[Bug tree-optimization/41377] [4.5 Regression] gimple EH rewrite causes ICE with PPRE (enabled at -O3)

2009-09-20 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2009-09-20 20:49 ---
This is a PPRE issue as turning off PRE fixes the issue and 
  do_partial_partial = optimize > 2;

changing that to 0 instead also does not expose the issue.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|[4.5 Regression] Revision   |[4.5 Regression] gimple EH
   |151696 caused ICE in|rewrite causes ICE with PPRE
   |unsplit_eh  |(enabled at -O3)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41377