This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17241] New: sh4 application SIGSEGV's with gcc-3.3.4 -O2
- From: "gp at qnx dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Aug 2004 17:24:04 -0000
- Subject: [Bug c/17241] New: sh4 application SIGSEGV's with gcc-3.3.4 -O2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A test case (src from libmad) SIGSEGV's when compiled with -O2. It runs with -
O0. It has the same behavior with gcc-3.3.1, gcc-3.3.3, and gcc-3.3.4
targetting sh-unknown-nto-qnx6.3.0. It looks like an sh optimization issue,
and not qnx specific.
Command line (generates no errors or warnings):
sh-unknown-nto-qnx-6.3.0-gcc-3.3.4 bug.c -obug -ml -O2
The pre-processed source is large, as any changes I made to the original
source made the SIGSEGV stop happening.
gdb output:
Program received signal SIGSEGV, Segmentation fault.
0x080409e4 in dct32 (in=0x8e4, slot=0, lo=0x803da64, hi=0xfffffff4)
at /tmp/gccbug/bug.c:167
167 t86 = t65 + t66; t109 = MUL(t65 - t66, costab20);
(gdb) bt
#0 0x080409e4 in dct32 (in=0x8e4, slot=0, lo=0x803da64, hi=0xfffffff4)
at /tmp/
gccbug/bug.c:167
#1 0x080411b4 in main (argc=2276, argv=0x0) at /tmp/gccbug/bug.c:427
(gdb)
--
Summary: sh4 application SIGSEGV's with gcc-3.3.4 -O2
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gp at qnx dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-pc-nto-qnx6.3.0
GCC host triplet: i386-pc-nto-qnx6.3.0
GCC target triplet: sh-unknown-nto-qnx6.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17241