With current trunk. This was introduced between 20070916 and 20071020. (sid)1687:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/gcc -c -O3 -Wall gnubg-rollout.c gnubg-rollout.c: In function 'RolloutGeneral': gnubg-rollout.c:15: internal compiler error: in is_hidden_global_store, at tree-ssa-sink.c:207 Please submit a full bug report, with preprocessed source if appropriate.
Created attachment 14575 [details] preprocessed source
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */ typedef struct { unsigned int fCubeful; } evalcontext; typedef struct { evalcontext aec[2]; unsigned int fCubeful:1; } rolloutcontext; void RolloutGeneral (int alternatives, int fCubeRollout, int et) { int i; rolloutcontext rc; rc.fCubeful = rc.fCubeful; for (i = 0; i < alternatives; i++) if (et != 1) rc.aec[i].fCubeful = fCubeRollout || rc.fCubeful; }
Confirmed. Called from tree_ssa_dce_loop (). # VUSE <rc_47, rc_47> { rc } # rc_45 = VDEF <rc_45> { rc } rc_45 = D.1197_49 != 0 ? rc_47 : rc_47 WTF? tree if-conversion generates this crap.
(In reply to comment #3) > WTF? tree if-conversion generates this crap. It split up the store to rc.aec[i].fCubeful .
Well I don't think ifcvt is fully to be blamed here: if (D.1542_49 != 0) goto <bb 13>; else goto <bb 12>; <bb 12>: # prephitmp.14_44 = PHI <1(13), 0(11)> # rc_45 = PHI <rc_47(13), rc_47(11)> Why do we have that last PHI anyways? Unswitch creates it.
Subject: Re: [4.3 Regression] ICE in is_hidden_global_store, at tree-ssa-sink.c:207 > > > ------- Comment #5 from pinskia at gcc dot gnu dot org 2007-11-20 09:13 ------- > Well I don't think ifcvt is fully to be blamed here: > > if (D.1542_49 != 0) > goto <bb 13>; > else > goto <bb 12>; > > <bb 12>: > # prephitmp.14_44 = PHI <1(13), 0(11)> > # rc_45 = PHI <rc_47(13), rc_47(11)> > > Why do we have that last PHI anyways? Unswitch creates it. I think more important question is why we do not optimize it out (many other optimizations, e.g. copy propagation, may create such phi nodes).
Subject: Bug 34140 Author: jakub Date: Wed Nov 28 19:48:19 2007 New Revision: 130494 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130494 Log: PR tree-optimization/34140 * tree-if-conv.c (if_convertible_phi_p): Fail if BB other than loop->header has virtual phi nodes. * gcc.c-torture/compile/20071128-1.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/20071128-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-if-conv.c
Fixed.