public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/13807] New: cc1 segfaults compiling specific thumb code
@ 2004-01-22 2:48 travis at danger dot com
2004-01-22 2:48 ` [Bug target/13807] " travis at danger dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: travis at danger dot com @ 2004-01-22 2:48 UTC (permalink / raw)
To: gcc-bugs
Summary:
Compiling the attached particular piece of code as thumb at -O2 causes the
compiler to seg fault inside asm_fprintf. It has been reproduced using gcc
3.3.2 on cygwin and gcc 3.3.1 on macos x. All were compiled using the same
options.
Release:
gcc 3.3.2 release
Environment:
Linux version 2.4.22-gentoo-r4 (root@varmit) (gcc version 3.2.3 20030422
(Gentoo Linux 1.4 3.2.3-r3, propolice)) #1 SMP Sat Jan 10 17:26:16 PST 2004
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-elf
Configured with: ../gcc-3.3.2/configure --prefix=/usr/local/armdev-3.3.2 --
target=arm-elf --program-prefix=arm-elf- --program-suffix=332 --with-newlib --
enable-languages=c
Thread model: single
gcc version 3.3.2
to repeat (where pco_trace.i is the attached file):
arm-elf-gcc332 -v --save-temps -c -mthumb -fno-builtin -O2 -W -Wall -mthumb-
interwork -fsigned-char -funsigned-bitfields -o pco_trace.o pco_trace.i
output is:
Reading specs from /usr/local/armdev-3.3.2-withsuffix/bin/../lib/gcc-lib/arm-
elf/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --prefix=/usr/local/armdev-3.3.2 --
target=arm-elf --program-prefix=arm-elf- --program-suffix=332 --with-newlib --
enable-languages=c
Thread model: single
gcc version 3.3.2
/usr/local/armdev-3.3.2-withsuffix/bin/../lib/gcc-lib/arm-elf/3.3.2/cc1 -
fpreprocessed pco_trace.i -quiet -dumpbase pco_trace.i -mthumb -mthumb-
interwork -auxbase-strip pco_trace.o -O2 -W -Wall -version -fno-builtin -
fsigned-char -funsigned-bitfields -o pco_trace.s
GNU C version 3.3.2 (arm-elf)
compiled by GNU C version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3,
propolice).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=129117
pco_trace.c: In function `read_str2ind_file':
pco_trace.c:147: warning: enumeration value `SCAN_SPACE' not handled in switch
pco_trace.c:58: warning: `fd' might be used uninitialized in this function
pco_trace.c:153: 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.
--
Summary: cc1 segfaults compiling specific thumb code
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: travis at danger dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
@ 2004-01-22 2:48 ` travis at danger dot com
2004-01-22 8:50 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: travis at danger dot com @ 2004-01-22 2:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From travis at danger dot com 2004-01-22 02:48 -------
Created an attachment (id=5551)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5551&action=view)
preprocessed file to reproduce crash
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
2004-01-22 2:48 ` [Bug target/13807] " travis at danger dot com
@ 2004-01-22 8:50 ` pinskia at gcc dot gnu dot org
2004-01-22 20:02 ` travis at danger dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-22 8:50 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
2004-01-22 2:48 ` [Bug target/13807] " travis at danger dot com
2004-01-22 8:50 ` pinskia at gcc dot gnu dot org
@ 2004-01-22 20:02 ` travis at danger dot com
2004-01-23 20:03 ` dhazeghi at yahoo dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: travis at danger dot com @ 2004-01-22 20:02 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]
------- Additional Comments From travis at danger dot com 2004-01-22 20:02 -------
FWIW here's the backtrace at the time of crash using gdb:
#0 0x080ec234 in asm_fprintf (file=0x8338660, p=0x827ec8f ", #%d]")
at ../../gcc-3.3.2/gcc/final.c:3774
#1 0x080ebc2d in output_address (x=0x401932ac) at ../../gcc-
3.3.2/gcc/final.c:3534
#2 0x081f7ffa in arm_print_operand (stream=0x827ec8f, x=0xbfffef91, code=0)
at ../../gcc-3.3.2/gcc/config/arm/arm.c:8773
#3 0x080ebb55 in output_operand (x=0x401932b8, code=1075379704) at ../../gcc-
3.3.2/gcc/final.c:3522
#4 0x080eb79e in output_asm_insn (template=0xbfffef91 "2\031@ðïÿ¿¸ïÿ¿³±\016\b´2
\031@`\2063\b", operands=0x830c900)
at ../../gcc-3.3.2/gcc/final.c:3445
#5 0x080ea60b in final_scan_insn (insn=0x827ec8f, file=0x8338660, optimize=2,
prescan=0, nopeepholes=0)
at ../../gcc-3.3.2/gcc/final.c:2814
#6 0x080e9ff7 in final (first=0x827ec8f, file=0x8338660, optimize=2,
prescan=0) at ../../gcc-3.3.2/gcc/final.c:1904
#7 0x081d0f61 in rest_of_compilation (decl=0x827ec8f) at ../../gcc-
3.3.2/gcc/toplev.c:3590
#8 0x0805a016 in c_expand_body (fndecl=0x40179bd0, nested_p=0, can_defer_p=1)
at ../../gcc-3.3.2/gcc/c-decl.c:6705
#9 0x08059d97 in finish_function (nested=0, can_defer_p=1075379704)
at ../../gcc-3.3.2/gcc/c-decl.c:6537
#10 0x08049e24 in yyparse () at c-parse.y:431
#11 0x080509f9 in c_common_parse_file (set_yydebug=1075379704) at ../../gcc-
3.3.2/gcc/c-lex.c:159
#12 0x081cfb2a in compile_file () at ../../gcc-3.3.2/gcc/toplev.c:2130
#13 0x081d4db5 in do_compile () at ../../gcc-3.3.2/gcc/toplev.c:5402
#14 0x081d4e5d in toplev_main (argc=1075379704, argv=0x0) at ../../gcc-
3.3.2/gcc/toplev.c:5432
#15 0x08088bfb in main (argc=1075379704, argv=0x4018fdf8) at ../../gcc-
3.3.2/gcc/main.c:35
#16 0x4002e90b in __libc_start_main () from /lib/libc.so.6
Looks like it goes south when it calls output_operand (x=0x401932b8 is totally
invalid)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
` (2 preceding siblings ...)
2004-01-22 20:02 ` travis at danger dot com
@ 2004-01-23 20:03 ` dhazeghi at yahoo dot com
2004-01-23 20:23 ` dhazeghi at yahoo dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-23 20:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dhazeghi at yahoo dot com 2004-01-23 20:03 -------
Created an attachment (id=5564)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5564&action=view)
slightly reduced testcase
Well, for me, source crashes in reload with an ICE (current 3.3 branch):
(insn:HI 92 221 93 17 0x40025370 (set (mem/s:QI (plus:SI (plus:SI (reg:SI 3 r3)
(reg:SI 1 r1))
(const_int 4 [0x4])) [0 format S1 A8])
(reg:QI 2 r2)) 178 {*thumb_movqi_insn} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
foo.i:50: internal compiler error: in reload_cse_simplify_operands, at
reload1.c:8353
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
` (3 preceding siblings ...)
2004-01-23 20:03 ` dhazeghi at yahoo dot com
@ 2004-01-23 20:23 ` dhazeghi at yahoo dot com
2004-01-24 12:21 ` rearnsha at arm dot com
2004-01-24 15:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-23 20:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dhazeghi at yahoo dot com 2004-01-23 20:23 -------
Compiles fine with 3.4 branch. Richard, do you know if this is fixed, or is reload just getting lucky?
Thanks.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rearnsha at arm dot com
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
` (4 preceding siblings ...)
2004-01-23 20:23 ` dhazeghi at yahoo dot com
@ 2004-01-24 12:21 ` rearnsha at arm dot com
2004-01-24 15:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at arm dot com @ 2004-01-24 12:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at arm dot com 2004-01-24 12:21 -------
Subject: Re: cc1 segfaults compiling specific thumb
code
It looks to me rather like a duplicate of 11271. Which is fixed for 3.4
but not on the 3.3 branch.
If it is, then it's a hairy part of reload and it's not clear whether it
can be fixed easily without disturbing other ports.
R.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/13807] cc1 segfaults compiling specific thumb code
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
` (5 preceding siblings ...)
2004-01-24 12:21 ` rearnsha at arm dot com
@ 2004-01-24 15:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-24 15:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-24 15:23 -------
Fixed for 3.4, unlikely going to be fixed for 3.3.3 as the current problem is a reload problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13807
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-01-24 15:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-22 2:48 [Bug target/13807] New: cc1 segfaults compiling specific thumb code travis at danger dot com
2004-01-22 2:48 ` [Bug target/13807] " travis at danger dot com
2004-01-22 8:50 ` pinskia at gcc dot gnu dot org
2004-01-22 20:02 ` travis at danger dot com
2004-01-23 20:03 ` dhazeghi at yahoo dot com
2004-01-23 20:23 ` dhazeghi at yahoo dot com
2004-01-24 12:21 ` rearnsha at arm dot com
2004-01-24 15:23 ` 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).