* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
@ 2013-01-18 17:34 ` mpolacek at gcc dot gnu.org
2013-01-18 21:59 ` mpolacek at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-18 17:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-18
CC| |mpolacek at gcc dot gnu.org
Known to work| |4.7.3
Summary|ICE in |[4.8 Regression] ICE in
|verify_loop_structure, at |verify_loop_structure, at
|cfgloop.c:1581 (loop n’s |cfgloop.c:1581 (loop n’s
|header does not belong |header does not belong
|directly to it !) |directly to it !)
Ever Confirmed|0 |1
Known to fail| |4.8.0
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-18 17:33:47 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
2013-01-18 17:34 ` [Bug tree-optimization/56035] [4.8 Regression] " mpolacek at gcc dot gnu.org
@ 2013-01-18 21:59 ` mpolacek at gcc dot gnu.org
2013-01-18 23:25 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-18 21:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-18 21:59:14 UTC ---
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=194582
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
2013-01-18 17:34 ` [Bug tree-optimization/56035] [4.8 Regression] " mpolacek at gcc dot gnu.org
2013-01-18 21:59 ` mpolacek at gcc dot gnu.org
@ 2013-01-18 23:25 ` mpolacek at gcc dot gnu.org
2013-01-21 13:27 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-18 23:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-18 23:25:19 UTC ---
Mine for now.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
` (2 preceding siblings ...)
2013-01-18 23:25 ` mpolacek at gcc dot gnu.org
@ 2013-01-21 13:27 ` rguenth at gcc dot gnu.org
2013-01-22 10:22 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-21 13:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking
Priority|P3 |P1
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
` (3 preceding siblings ...)
2013-01-21 13:27 ` rguenth at gcc dot gnu.org
@ 2013-01-22 10:22 ` mpolacek at gcc dot gnu.org
2013-01-22 11:39 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-22 10:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-22 10:22:21 UTC ---
The problem looks to be in fix_loop_structures:
/* If there was no latch, schedule the loop for removal. */
if (!first_latch)
loop->header = NULL;
/* If there was a single latch and it belongs to the loop of the
header, record it. */
else if (latch
&& latch->src->loop_father == loop)
loop->latch = latch->src;
/* Otherwise there are multiple latches which are eventually
disambiguated below. */
else
loop->latch = NULL;
we have the first_latch and there's only one latch edge, so we should the the
else if branch. But we don't, since latch->src->loop_father != loop. It looks
like the loop_father info isn't correct at all, ->loop_father->num is always 0,
but if we defer re-computing the latches to after re-scanning the bodies of
loops and fixing the nesting, everything seems to be fine (and the final
assembly is the same as before r194582).
The CFG is quite weird though, e.g. EXIT has no predecessors at all.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
` (4 preceding siblings ...)
2013-01-22 10:22 ` mpolacek at gcc dot gnu.org
@ 2013-01-22 11:39 ` jakub at gcc dot gnu.org
2013-01-22 13:25 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-22 11:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-22 11:38:47 UTC ---
EXIT with no predecessors is fine, if the body of the function always ends with
endless loops. Consider void foo (void) { for (;;); } which doesn't have any
EXIT predecessors either.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
` (5 preceding siblings ...)
2013-01-22 11:39 ` jakub at gcc dot gnu.org
@ 2013-01-22 13:25 ` mpolacek at gcc dot gnu.org
2013-01-25 8:52 ` mpolacek at gcc dot gnu.org
2013-01-25 8:53 ` mpolacek at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-22 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-22 13:24:40 UTC ---
Created attachment 29248
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29248
pr56035
Potential fix
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
` (6 preceding siblings ...)
2013-01-22 13:25 ` mpolacek at gcc dot gnu.org
@ 2013-01-25 8:52 ` mpolacek at gcc dot gnu.org
2013-01-25 8:53 ` mpolacek at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-25 8:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-25 08:52:33 UTC ---
Author: mpolacek
Date: Fri Jan 25 08:52:02 2013
New Revision: 195462
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195462
Log:
Fix PR56035.
Added:
trunk/gcc/testsuite/gcc.dg/pr56035.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgloopmanip.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/56035] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !)
2013-01-18 17:28 [Bug tree-optimization/56035] New: ICE in verify_loop_structure, at cfgloop.c:1581 (loop n’s header does not belong directly to it !) antoine.balestrat at gmail dot com
` (7 preceding siblings ...)
2013-01-25 8:52 ` mpolacek at gcc dot gnu.org
@ 2013-01-25 8:53 ` mpolacek at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-01-25 8:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56035
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-01-25 08:53:16 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread