public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/24279] New: SEGV at reload.c:2400 with -O2
@ 2005-10-08 21:16 shap at eros-os dot org
2005-10-08 21:18 ` [Bug c/24279] " shap at eros-os dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: shap at eros-os dot org @ 2005-10-08 21:16 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]
I am cross-building a compiler, hosted on FC4 (i686-pc-linux-gnu) and targeting
m68k-elf. The following bug is reproducible in gcc-4.0.1 and gcc-4.0.2. The
offending line number is in gcc-4.0.2. The bug causes build of newlib to fail.
Here is how I am building the cross tool chain. I am aware that this is not
ideal, but it is simpler than the real build for my actual target
(m68k-unknown-coyotos). The failure is reproducible using the instructions
below.
# Unpack binutils-2.16.1
# make an empty directory, configure as
{BINUTILS_SRC}/configure --prefix=/usr/local/m68k-elf --target m68k-elf
# Build binutils as follows:
make tooldir=/usr/local/m68k-elf all
make install
#Unpack gcc-core-4.0.2 from FSF
# configure with:
{GCC_SRC}/configure --prefix=/usr/local/m68k-elf --without-headers
--with-newlib --disable-libmudflap --enable-languages=c --target m68k-elf
# build with:
PATH=/usr/local/m68k-elf/bin:${PATH} make gcc_tooldir=/usr/local/m68k-elf/bin
all-gcc
PATH=/usr/local/m68k-elf/bin:${PATH} make gcc_tooldir=/usr/local/m68k-elf/bin
install-gcc
This build proceeds successfully. Following the build, I attempt to execute
(vfprintf.i attached):
/usr/local/m68k-elf/libexec/gcc/m68k-elf/4.0.2/cc1 -fpreprocessed vfprintf.i
-quiet -dumpbase vfprintf.c -m68000 -m68000 -auxbase vfprintf -g -O2 -version
-fno-builtin -fshort-enums -o vfprintf.s
GNU C version 4.0.2 (m68k-elf)
compiled by GNU C version 4.0.1 20050727 (Red Hat 4.0.1-5).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129233
../../../../../../newlib-1.13.0/newlib/libc/stdio/vfprintf.c: In function
_vfprintf_r:
../../../../../../newlib-1.13.0/newlib/libc/stdio/vfprintf.c:1220: 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.
Compilation succeeds if '-O2' is replaced with '-O1' or '-O'. Turning off the
various -f options has no impact.
I am more than happy to test proposed patches if helpful.
--
Summary: SEGV at reload.c:2400 with -O2
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: shap at eros-os dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m68k-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
@ 2005-10-08 21:18 ` shap at eros-os dot org
2005-10-08 21:20 ` shap at eros-os dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: shap at eros-os dot org @ 2005-10-08 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from shap at eros-os dot org 2005-10-08 21:18 -------
Created an attachment (id=9942)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9942&action=view)
preprocessed vfprintf.c from newlib for this target.
This is the input file that I am trying to compile. I have not attempted to
chop it down.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
2005-10-08 21:18 ` [Bug c/24279] " shap at eros-os dot org
@ 2005-10-08 21:20 ` shap at eros-os dot org
2005-10-08 21:24 ` [Bug middle-end/24279] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: shap at eros-os dot org @ 2005-10-08 21:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from shap at eros-os dot org 2005-10-08 21:20 -------
Setting aside whether this particular piece of code is broken (it may be, but
it is a pretty widely used part of newlib), it seems unlikely that a SIGSEGV in
the optimizer would be the preferred diagnostic. ;-)
Jokes aside, I'm set up to rebuild my target quickly, so if there is a patch to
test or a further experiment to run please do not hesitate to ask.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
2005-10-08 21:18 ` [Bug c/24279] " shap at eros-os dot org
2005-10-08 21:20 ` shap at eros-os dot org
@ 2005-10-08 21:24 ` pinskia at gcc dot gnu dot org
2005-10-08 21:58 ` shap at eros-os dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-08 21:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-08 21:24 -------
I think this might be a duplicate of PR 23043 which is fixed for 4.0.3, it
missed 4.0.2 by a mistake. Can you try a cvs version of the 4.0 branch to see
if this is fixed? Or try the patch which is referenced in that PR?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
` (2 preceding siblings ...)
2005-10-08 21:24 ` [Bug middle-end/24279] " pinskia at gcc dot gnu dot org
@ 2005-10-08 21:58 ` shap at eros-os dot org
2005-10-08 22:19 ` shap at eros-os dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: shap at eros-os dot org @ 2005-10-08 21:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from shap at eros-os dot org 2005-10-08 21:58 -------
Testing the patch now. I'll report back shortly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
` (3 preceding siblings ...)
2005-10-08 21:58 ` shap at eros-os dot org
@ 2005-10-08 22:19 ` shap at eros-os dot org
2005-11-05 19:45 ` shap at eros-os dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: shap at eros-os dot org @ 2005-10-08 22:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from shap at eros-os dot org 2005-10-08 22:19 -------
The patch from PR 23043 does NOT resolve this. Same error, reported at the same
place in reload.c.
Given the number of other mode-related bugs against m68k, I was suspicious of
that, but when I re-run under gdb, the value of val.start at the time of the
fault is improbably high (1708), and then I get
(gdb) p hard_regno_nregs[val.start]
Cannot access memory at address 0x831b0d0
Not sure if this helps suggest anything.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
` (4 preceding siblings ...)
2005-10-08 22:19 ` shap at eros-os dot org
@ 2005-11-05 19:45 ` shap at eros-os dot org
2005-11-19 21:14 ` kazu at gcc dot gnu dot org
2006-05-08 16:32 ` kazu at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: shap at eros-os dot org @ 2005-11-05 19:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from shap at eros-os dot org 2005-11-05 19:44 -------
I know you folks have many other things to do, but any further ideas on this
one? If not, what can I do to help get the test case confirmed and into the
regression suite?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
` (5 preceding siblings ...)
2005-11-05 19:45 ` shap at eros-os dot org
@ 2005-11-19 21:14 ` kazu at gcc dot gnu dot org
2006-05-08 16:32 ` kazu at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: kazu at gcc dot gnu dot org @ 2005-11-19 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from kazu at gcc dot gnu dot org 2005-11-19 21:13 -------
Jonathan,
The testcase seems to work with GCC 4.1.
As far as getting the testcase into the testsuite, you need to post a patch
first.
The best thing to do at this point is to reduce the testcase so that it will be
easier to analyze what's going on.
--
kazu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at gcc dot gnu dot org
Known to work| |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/24279] SEGV at reload.c:2400 with -O2
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
` (6 preceding siblings ...)
2005-11-19 21:14 ` kazu at gcc dot gnu dot org
@ 2006-05-08 16:32 ` kazu at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: kazu at gcc dot gnu dot org @ 2006-05-08 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from kazu at gcc dot gnu dot org 2006-05-08 16:32 -------
Works as of 4.1 according to #7.
--
kazu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24279
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-05-08 16:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-08 21:16 [Bug c/24279] New: SEGV at reload.c:2400 with -O2 shap at eros-os dot org
2005-10-08 21:18 ` [Bug c/24279] " shap at eros-os dot org
2005-10-08 21:20 ` shap at eros-os dot org
2005-10-08 21:24 ` [Bug middle-end/24279] " pinskia at gcc dot gnu dot org
2005-10-08 21:58 ` shap at eros-os dot org
2005-10-08 22:19 ` shap at eros-os dot org
2005-11-05 19:45 ` shap at eros-os dot org
2005-11-19 21:14 ` kazu at gcc dot gnu dot org
2006-05-08 16:32 ` kazu 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).