* [Bug middle-end/18718] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
@ 2004-11-29 15:48 ` micis at gmx dot de
2004-11-29 16:14 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: micis at gmx dot de @ 2004-11-29 15:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From micis at gmx dot de 2004-11-29 15:48 -------
Created an attachment (id=7632)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7632&action=view)
preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
2004-11-29 15:48 ` [Bug middle-end/18718] " micis at gmx dot de
@ 2004-11-29 16:14 ` pinskia at gcc dot gnu dot org
2004-11-29 16:20 ` [Bug middle-end/18718] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 16:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 16:14 -------
Reduced to:
typedef long unsigned int size_t;
struct ACEXML_SAXPrint_Handler
{
void print_indent ();
size_t indent_;
};
int f();
void
ACEXML_SAXPrint_Handler::print_indent (void)
{
for (size_t i = 0; i < this->indent_; ++i)
f ();
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
2004-11-29 15:48 ` [Bug middle-end/18718] " micis at gmx dot de
2004-11-29 16:14 ` pinskia at gcc dot gnu dot org
@ 2004-11-29 16:20 ` pinskia at gcc dot gnu dot org
2004-11-29 16:55 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 16:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 16:20 -------
g++ pr18718.cc -O3 -funroll-all-loops -ftracer
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Known to fail| |4.0.0
Known to work| |3.3.2
Last reconfirmed|0000-00-00 00:00:00 |2004-11-29 16:20:23
date| |
Summary|ICE: Segmentation fault in |[4.0 Regression] ICE:
|in schedule_region (rgn=0) |Segmentation fault in in
|at sched-rgn.c:2325 |schedule_region (rgn=0) at
| |sched-rgn.c:2325
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (2 preceding siblings ...)
2004-11-29 16:20 ` [Bug middle-end/18718] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-29 16:55 ` pinskia at gcc dot gnu dot org
2004-11-29 18:11 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 16:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 16:55 -------
hmm, the loop looks right:
for (note = REG_NOTES (head); note; note = XEXP (note, 1))
if (REG_NOTE_KIND (note) == REG_SAVE_NOTE)
Maybe we are miscompiling sched-regn.c.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (3 preceding siblings ...)
2004-11-29 16:55 ` pinskia at gcc dot gnu dot org
@ 2004-11-29 18:11 ` pinskia at gcc dot gnu dot org
2004-11-30 3:25 ` amodra at bigpond dot net dot au
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 18:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-29 18:11 -------
No we get this even when the compiler is compiled with -O0.
There is only one reg note which is causing this seg fault:
(expr_list:REG_SAVE_NOTE (const_int -94 [0xffffffffffffffa2])
(nil))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (4 preceding siblings ...)
2004-11-29 18:11 ` pinskia at gcc dot gnu dot org
@ 2004-11-30 3:25 ` amodra at bigpond dot net dot au
2004-11-30 3:57 ` amodra at bigpond dot net dot au
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-30 3:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2004-11-30 03:25 -------
Obviously, the loop expects REG_SAVE_NOTEs in pairs, which it isn't getting,
hence the segfault.
This is because the function that adds these notes, sched_analyze, is being
called on basic blocks, and the NOTE_INSN_LOOP_BEG/END pair isn't in the same
basic block. Smell like bit rot.
;; End of basic block 2, registers live:
1 [1] 31 [31] 67 [ap] 123 124
(note:HI 48 22 23 NOTE_INSN_LOOP_BEG)
;; Start of basic block 3, registers live: 1 [1] 31 [31] 67 [ap] 123 124
(code_label:HI 23 48 24 3 4 "" [1 uses])
[snip]
;; Start of basic block 4, registers live: 1 [1] 31 [31] 67 [ap] 122 124
[snip]
(note:HI 49 34 63 4 NOTE_INSN_LOOP_END)
[snip]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (5 preceding siblings ...)
2004-11-30 3:25 ` amodra at bigpond dot net dot au
@ 2004-11-30 3:57 ` amodra at bigpond dot net dot au
2004-11-30 4:48 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-30 3:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2004-11-30 03:57 -------
Hmm, no, that's not quite right. It's nothing to do with the loop begin/end
note needing to be recognized in the same analysis pass, but rather that older
code emitted two REG_SAVE_NOTEs on each occurence of various other notes. See
the corresponding code in gcc-3.4.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (6 preceding siblings ...)
2004-11-30 3:57 ` amodra at bigpond dot net dot au
@ 2004-11-30 4:48 ` pinskia at gcc dot gnu dot org
2004-11-30 4:49 ` amodra at bigpond dot net dot au
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-30 4:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-30 04:47 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02654.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (7 preceding siblings ...)
2004-11-30 4:48 ` pinskia at gcc dot gnu dot org
@ 2004-11-30 4:49 ` amodra at bigpond dot net dot au
2004-11-30 12:44 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-30 4:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |amodra at bigpond dot net
|dot org |dot au
Status|NEW |ASSIGNED
Known to work|3.3.2 |3.3.2 3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (8 preceding siblings ...)
2004-11-30 4:49 ` amodra at bigpond dot net dot au
@ 2004-11-30 12:44 ` steven at gcc dot gnu dot org
2004-12-03 11:43 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-11-30 12:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-11-30 12:44 -------
My bad, I guess. See http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01357.html.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (9 preceding siblings ...)
2004-11-30 12:44 ` steven at gcc dot gnu dot org
@ 2004-12-03 11:43 ` steven at gcc dot gnu dot org
2004-12-03 23:05 ` amodra at bigpond dot net dot au
2004-12-03 23:55 ` amodra at bigpond dot net dot au
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-03 11:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-03 11:42 -------
The same problem exists in sched-ebb.c, see
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg00260.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (10 preceding siblings ...)
2004-12-03 11:43 ` steven at gcc dot gnu dot org
@ 2004-12-03 23:05 ` amodra at bigpond dot net dot au
2004-12-03 23:55 ` amodra at bigpond dot net dot au
12 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-12-03 23:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2004-12-03 23:05 -------
Fixed both sched-ebb.c and sched-rgn.c
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug middle-end/18718] [4.0 Regression] ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325
2004-11-29 15:46 [Bug middle-end/18718] New: ICE: Segmentation fault in in schedule_region (rgn=0) at sched-rgn.c:2325 micis at gmx dot de
` (11 preceding siblings ...)
2004-12-03 23:05 ` amodra at bigpond dot net dot au
@ 2004-12-03 23:55 ` amodra at bigpond dot net dot au
12 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-12-03 23:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2004-12-03 23:55 -------
Um, middle-end spelled wrongly in the log, so adding this by hand
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: amodra@gcc.gnu.org 2004-12-03 23:02:33
Modified files:
gcc : ChangeLog sched-rgn.c sched-ebb.c
Log message:
PR middle end/18718
* sched-rgn.c (schedule_region): Don't assume REG_SAVE_NOTEs are
in pairs.
* sched-ebb.c (schedule_ebb): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6705&r2=2.6706
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/sched-rgn.c.diff?cvsroot=gcc&r1=1.87&r2=1.88
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/sched-ebb.c.diff?cvsroot=gcc&r1=1.41&r2=1.42
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18718
^ permalink raw reply [flat|nested] 14+ messages in thread