* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
@ 2012-02-16 19:57 ` bernds at gcc dot gnu.org
2012-02-16 20:08 ` ro at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bernds at gcc dot gnu.org @ 2012-02-16 19:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #1 from Bernd Schmidt <bernds at gcc dot gnu.org> 2012-02-16 19:47:29 UTC ---
Please attach the reginfo.ii file.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
2012-02-16 19:57 ` [Bug bootstrap/52287] " bernds at gcc dot gnu.org
@ 2012-02-16 20:08 ` ro at gcc dot gnu.org
2012-02-16 21:05 ` bernds at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ro at gcc dot gnu.org @ 2012-02-16 20:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> 2012-02-16 19:52:40 UTC ---
Created attachment 26684
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26684
preprocessed input
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
2012-02-16 19:57 ` [Bug bootstrap/52287] " bernds at gcc dot gnu.org
2012-02-16 20:08 ` ro at gcc dot gnu.org
@ 2012-02-16 21:05 ` bernds at gcc dot gnu.org
2012-02-17 12:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bernds at gcc dot gnu.org @ 2012-02-16 21:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #3 from Bernd Schmidt <bernds at gcc dot gnu.org> 2012-02-16 20:43:03 UTC ---
Not reproducible with a cross compiler.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (2 preceding siblings ...)
2012-02-16 21:05 ` bernds at gcc dot gnu.org
@ 2012-02-17 12:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-02-20 12:06 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2012-02-17 12:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-02-17 11:56:05 UTC ---
> --- Comment #3 from Bernd Schmidt <bernds at gcc dot gnu.org> 2012-02-16 20:43:03 UTC ---
> Not reproducible with a cross compiler.
I've just verified that reverting your patch allows the bootstrap to get
into stage3.
Rainer
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (3 preceding siblings ...)
2012-02-17 12:13 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2012-02-20 12:06 ` rguenth at gcc dot gnu.org
2012-02-22 15:10 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-20 12:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (4 preceding siblings ...)
2012-02-20 12:06 ` rguenth at gcc dot gnu.org
@ 2012-02-22 15:10 ` jakub at gcc dot gnu.org
2012-02-22 17:50 ` ebotcazou at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-22 15:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
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> 2012-02-22 15:02:44 UTC ---
Yeah, can't reproduce this with a cross either, and even valgrind is clean on
it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (5 preceding siblings ...)
2012-02-22 15:10 ` jakub at gcc dot gnu.org
@ 2012-02-22 17:50 ` ebotcazou at gcc dot gnu.org
2012-02-23 14:44 ` ebotcazou at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-02-22 17:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-22
Ever Confirmed|0 |1
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-22 17:24:53 UTC ---
I can reproduce with a native compiler.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (6 preceding siblings ...)
2012-02-22 17:50 ` ebotcazou at gcc dot gnu.org
@ 2012-02-23 14:44 ` ebotcazou at gcc dot gnu.org
2012-02-23 15:33 ` ebotcazou at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-02-23 14:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26684|0 |1
is obsolete| |
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |ebotcazou at gcc dot
|gnu.org |gnu.org
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-23 14:28:10 UTC ---
Created attachment 26734
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26734
Reduced testcase
Still reproducible on native only.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (7 preceding siblings ...)
2012-02-23 14:44 ` ebotcazou at gcc dot gnu.org
@ 2012-02-23 15:33 ` ebotcazou at gcc dot gnu.org
2012-02-23 15:50 ` bernds at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-02-23 15:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-23 15:23:44 UTC ---
This reproduces only on Solaris 8 because the sort of the ready list isn't
stable in the presence of debug insns, given that rank_for_schedule isn't
anti-symmetrical:
if (MAY_HAVE_DEBUG_INSNS)
{
/* Schedule debug insns as early as possible. */
if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2))
return -1;
else if (DEBUG_INSN_P (tmp2))
return 1;
}
The following patchlet is enough to get rid of the ICE:
Index: haifa-sched.c
===================================================================
--- haifa-sched.c (revision 184352)
+++ haifa-sched.c (working copy)
@@ -1647,7 +1647,7 @@ rank_for_schedule (const void *x, const
/* Schedule debug insns as early as possible. */
if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2))
return -1;
- else if (DEBUG_INSN_P (tmp2))
+ else if (DEBUG_INSN_P (tmp2) && !DEBUG_INSN_P (tmp))
return 1;
}
as it makes the sort stable and equivalent to the non-Solaris 8 case.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (8 preceding siblings ...)
2012-02-23 15:33 ` ebotcazou at gcc dot gnu.org
@ 2012-02-23 15:50 ` bernds at gcc dot gnu.org
2012-02-23 15:56 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: bernds at gcc dot gnu.org @ 2012-02-23 15:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #9 from Bernd Schmidt <bernds at gcc dot gnu.org> 2012-02-23 15:41:49 UTC ---
(In reply to comment #8)
> This reproduces only on Solaris 8 because the sort of the ready list isn't
> stable in the presence of debug insns, given that rank_for_schedule isn't
> anti-symmetrical:
Thanks for investigating this.
> Index: haifa-sched.c
> ===================================================================
> --- haifa-sched.c (revision 184352)
> +++ haifa-sched.c (working copy)
> @@ -1647,7 +1647,7 @@ rank_for_schedule (const void *x, const
> /* Schedule debug insns as early as possible. */
> if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2))
> return -1;
> - else if (DEBUG_INSN_P (tmp2))
> + else if (DEBUG_INSN_P (tmp2) && !DEBUG_INSN_P (tmp))
> return 1;
> }
>
> as it makes the sort stable and equivalent to the non-Solaris 8 case.
Almost OK, but in the case of two debug insns, can you make it return the
difference of the INSN_UIDs here? I'd rather not fall through into the other
code for DEBUG_INSNs.
Such a patch is preapproved.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (9 preceding siblings ...)
2012-02-23 15:50 ` bernds at gcc dot gnu.org
@ 2012-02-23 15:56 ` jakub at gcc dot gnu.org
2012-02-23 16:34 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-23 15:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-23 15:52:23 UTC ---
I don't think INSN_UID is right for that, I think you want to preserve the
original order of debug insns in that case, and INSN_UID can jump up and down.
So what about
if (MAY_HAVE_DEBUG_INSNS)
{
/* Schedule debug insns as early as possible. */
if (DEBUG_INSN (tmp))
{
if (DEBUG_INSN (tmp2))
return INSN_LUID (tmp) - INSN_LUID (tmp2);
return -1;
}
else if (DEBUG_INSN (tmp2))
return 1;
}
?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (10 preceding siblings ...)
2012-02-23 15:56 ` jakub at gcc dot gnu.org
@ 2012-02-23 16:34 ` ebotcazou at gcc dot gnu.org
2012-02-23 22:19 ` ebotcazou at gcc dot gnu.org
2012-02-23 22:34 ` ebotcazou at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-02-23 16:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-23 16:00:58 UTC ---
Created attachment 26736
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26736
Tentative fix
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (11 preceding siblings ...)
2012-02-23 16:34 ` ebotcazou at gcc dot gnu.org
@ 2012-02-23 22:19 ` ebotcazou at gcc dot gnu.org
2012-02-23 22:34 ` ebotcazou at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-02-23 22:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-23 22:15:53 UTC ---
Author: ebotcazou
Date: Thu Feb 23 22:15:44 2012
New Revision: 184531
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184531
Log:
PR bootstrap/52287
* haifa-sched.c (rank_for_schedule): Stabilize sort for debug insns.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/haifa-sched.c
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927
2012-02-16 19:18 [Bug bootstrap/52287] New: [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 ro at gcc dot gnu.org
` (12 preceding siblings ...)
2012-02-23 22:19 ` ebotcazou at gcc dot gnu.org
@ 2012-02-23 22:34 ` ebotcazou at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-02-23 22:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #13 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-23 22:17:45 UTC ---
Patch applied.
^ permalink raw reply [flat|nested] 15+ messages in thread