public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23117] New: ICE on valid code while building libgcc
@ 2005-07-28 19:55 raj dot khem at gmail dot com
2005-07-28 19:56 ` [Bug c/23117] " raj dot khem at gmail dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: raj dot khem at gmail dot com @ 2005-07-28 19:55 UTC (permalink / raw)
To: gcc-bugs
The latest compiler build from CVS sources on 07-28-2005 segfaults while
building libgcc for arm-softfloat target with -O2,O2,Os opt levels. The error
does not happen when -O1 is used
The program compiles fine when I use my host compiler which is gcc version 4.0.1
20050727 (Red Hat 4.0.1-5)
error log
================================
__do_global_ctors_aux
Analyzing compilation unitPerforming intraprocedural optimizations
Assembling functions:
__do_global_ctors_aux
/home/kraj/a.c: In function '__do_global_ctors_aux':
/home/kraj/a.c:8: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
====================================
How to reporoduce
gcc -O2 -c testcase.c
testcase.c
====================================
typedef void (*func_ptr) (void);
static func_ptr __CTOR_END__[1] = {(func_ptr) 0 };
static void __attribute__((used)) __do_global_ctors_aux (void)
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
(*p) ();
}
=======================================================
--
Summary: ICE on valid code while building libgcc
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: raj dot khem at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-host_pc-linux-gnu
GCC target triplet: arm-softfloat-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/23117] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
@ 2005-07-28 19:56 ` raj dot khem at gmail dot com
2005-07-28 19:59 ` [Bug middle-end/23117] " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: raj dot khem at gmail dot com @ 2005-07-28 19:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/23117] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
2005-07-28 19:56 ` [Bug c/23117] " raj dot khem at gmail dot com
@ 2005-07-28 19:59 ` pinskia at gcc dot gnu dot org
2005-07-28 20:28 ` [Bug rtl-optimization/23117] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-28 19:59 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|c |middle-end
Keywords| |build, ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
2005-07-28 19:56 ` [Bug c/23117] " raj dot khem at gmail dot com
2005-07-28 19:59 ` [Bug middle-end/23117] " pinskia at gcc dot gnu dot org
@ 2005-07-28 20:28 ` pinskia at gcc dot gnu dot org
2005-07-28 22:20 ` raj dot khem at gmail dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-28 20:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-28 20:06 -------
Confirmed, backtrace:
#0 0x007f7a4c in add_branch_dependences (head=0x1e918f0, tail=0x1e918f0) at ../../gcc/sched-
rgn.c:1987
#1 0x007f818c in compute_block_backward_dependences (bb=0) at ../../gcc/sched-rgn.c:2142
#2 0x007f8a80 in schedule_region (rgn=3) at ../../gcc/sched-rgn.c:2290
#3 0x007f9828 in schedule_insns (dump_file=0x0) at ../../gcc/sched-rgn.c:2547
#4 0x007f9e14 in rest_of_handle_sched2 () at ../../gcc/sched-rgn.c:2700
#5 0x0063bbd0 in execute_one_pass (pass=0x8a4e94) at ../../gcc/passes.c:793
This is an RTL optimization bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |rtl-optimization
Ever Confirmed| |1
GCC host triplet|i686-host_pc-linux-gnu |
GCC target triplet|arm-softfloat-linux-gnu |arm-*-linux-gnu
Last reconfirmed|0000-00-00 00:00:00 |2005-07-28 20:06:10
date| |
Summary|ICE on valid code while |[4.1 Regression] ICE on
|building libgcc |valid code while building
| |libgcc
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (2 preceding siblings ...)
2005-07-28 20:28 ` [Bug rtl-optimization/23117] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-07-28 22:20 ` raj dot khem at gmail dot com
2005-07-28 22:25 ` raj dot khem at gmail dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: raj dot khem at gmail dot com @ 2005-07-28 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From raj dot khem at gmail dot com 2005-07-28 22:02 -------
This seems to have been caused by some checkin that went in after 7/27/2005 (i.e
only checkins that went in today 7/28) because when I cvs up -D 2005-07-27 I
dont get the segfault.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (3 preceding siblings ...)
2005-07-28 22:20 ` raj dot khem at gmail dot com
@ 2005-07-28 22:25 ` raj dot khem at gmail dot com
2005-07-28 22:40 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: raj dot khem at gmail dot com @ 2005-07-28 22:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From raj dot khem at gmail dot com 2005-07-28 22:20 -------
(In reply to comment #2)
> This seems to have been caused by some checkin that went in after 7/27/2005 (i.e
> only checkins that went in today 7/28) because when I cvs up -D 2005-07-27 I
> dont get the segfault.
Amends, To narrow it further the problem is caused by some checkin that happened
on 7/27 because upto 0:00 hours it builds ok but not cvs up -D "2005-07-27 23:59"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (4 preceding siblings ...)
2005-07-28 22:25 ` raj dot khem at gmail dot com
@ 2005-07-28 22:40 ` pinskia at gcc dot gnu dot org
2005-07-28 23:37 ` steven at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-28 22:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-28 22:35 -------
Did the build which worked include the fix for PR rtl-optimization/17808? You can find out by looking
at ChangeLog.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (6 preceding siblings ...)
2005-07-28 23:37 ` steven at gcc dot gnu dot org
@ 2005-07-28 23:37 ` steven at gcc dot gnu dot org
2005-07-29 4:34 ` raj dot khem at gmail dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-07-28 23:37 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |17808
nThis| |
AssignedTo|unassigned at gcc dot gnu |steven at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-07-28 20:06:10 |2005-07-28 23:37:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (5 preceding siblings ...)
2005-07-28 22:40 ` pinskia at gcc dot gnu dot org
@ 2005-07-28 23:37 ` steven at gcc dot gnu dot org
2005-07-28 23:37 ` steven at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-07-28 23:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-07-28 23:31 -------
Try this, like Richard Earnshaw is doing.
Index: sched-rgn.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-rgn.c,v
retrieving revision 1.99
diff -u -p -r1.99 sched-rgn.c
--- sched-rgn.c 27 Jul 2005 16:28:34 -0000 1.99
+++ sched-rgn.c 28 Jul 2005 23:31:29 -0000
@@ -1977,17 +1977,17 @@ add_branch_dependences (rtx head, rtx ta
if (!reload_completed || ! JUMP_P (tail))
return;
- insn = PREV_INSN (tail);
+ insn = tail;
while (insn != head)
{
+ insn = PREV_INSN (insn);
+
/* Note that we want to add this dependency even when
sched_insns_conditions_mutex_p returns true. The whole point
is that we _want_ this dependency, even if these insns really
are independent. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC)
add_dependence (tail, insn, REG_DEP_ANTI);
-
- insn = PREV_INSN (insn);
}
#endif
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (7 preceding siblings ...)
2005-07-28 23:37 ` steven at gcc dot gnu dot org
@ 2005-07-29 4:34 ` raj dot khem at gmail dot com
2005-07-29 9:33 ` rearnsha at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: raj dot khem at gmail dot com @ 2005-07-29 4:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From raj dot khem at gmail dot com 2005-07-29 03:50 -------
The problem indeed was caused by checkin for PR rtl-optimization/17808. I
verified it.
Then I tried the Steven's fix above and I was able to build the GCC and rest of
toolchain.
I havent tested the compiler.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (9 preceding siblings ...)
2005-07-29 9:33 ` rearnsha at gcc dot gnu dot org
@ 2005-07-29 9:33 ` cvs-commit at gcc dot gnu dot org
2005-07-29 16:38 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-29 9:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-29 09:32 -------
Subject: Bug 23117
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rearnsha@gcc.gnu.org 2005-07-29 09:32:16
Modified files:
gcc : ChangeLog sched-rgn.c
Log message:
Richard Earnshaw <richard.earnshaw@arm.com>
Steven Bosscher <stevenb@suse.de>
PR rtl-optimization/23117
* sched-rgn.c (add_branch_dependences): Handle COND_EXEC correctly
when head == tail. Tidy comment.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9597&r2=2.9598
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/sched-rgn.c.diff?cvsroot=gcc&r1=1.99&r2=1.100
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (8 preceding siblings ...)
2005-07-29 4:34 ` raj dot khem at gmail dot com
@ 2005-07-29 9:33 ` rearnsha at gcc dot gnu dot org
2005-07-29 9:33 ` cvs-commit at gcc dot gnu dot org
2005-07-29 16:38 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-07-29 9:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-07-29 09:33 -------
Fixed with suggested patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/23117] [4.1 Regression] ICE on valid code while building libgcc
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
` (10 preceding siblings ...)
2005-07-29 9:33 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-29 16:38 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-29 16:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-29 16:31 -------
*** Bug 23136 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-07-29 16:32 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-28 19:55 [Bug tree-optimization/23117] New: ICE on valid code while building libgcc raj dot khem at gmail dot com
2005-07-28 19:56 ` [Bug c/23117] " raj dot khem at gmail dot com
2005-07-28 19:59 ` [Bug middle-end/23117] " pinskia at gcc dot gnu dot org
2005-07-28 20:28 ` [Bug rtl-optimization/23117] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-07-28 22:20 ` raj dot khem at gmail dot com
2005-07-28 22:25 ` raj dot khem at gmail dot com
2005-07-28 22:40 ` pinskia at gcc dot gnu dot org
2005-07-28 23:37 ` steven at gcc dot gnu dot org
2005-07-28 23:37 ` steven at gcc dot gnu dot org
2005-07-29 4:34 ` raj dot khem at gmail dot com
2005-07-29 9:33 ` rearnsha at gcc dot gnu dot org
2005-07-29 9:33 ` cvs-commit at gcc dot gnu dot org
2005-07-29 16:38 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).