public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets
@ 2013-04-02 8:03 terry.guo at arm dot com
2013-04-02 8:12 ` [Bug c/56809] " terry.guo at arm dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: terry.guo at arm dot com @ 2013-04-02 8:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
Bug #: 56809
Summary: Revision 197266 causes trunk ICE for arm-none-eabi
targets
Classification: Unclassified
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: terry.guo@arm.com
After build a tool chain from trunk@r197266 for arm-none-eabi, then use it to
compile a simple case with switch statement, I got below ICE:
terguo01@terry-pc01:bad$ ../../install-native/bin/arm-none-eabi-gcc -O2 -S
test.c
test.c: In function 'foo':
test.c:29:1: internal compiler error: in thumb2_output_casesi, at
config/arm/arm.c:25830
}
^
0x87f9da3 thumb2_output_casesi(rtx_def**)
/work/terguo01/build-toolchain/latest/src/gcc/gcc/config/arm/arm.c:25830
0x83265d6 final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
/work/terguo01/build-toolchain/latest/src/gcc/gcc/final.c:2854
0x83271c5 final(rtx_def*, _IO_FILE*, int)
/work/terguo01/build-toolchain/latest/src/gcc/gcc/final.c:1958
0x832740a rest_of_handle_final
/work/terguo01/build-toolchain/latest/src/gcc/gcc/final.c:4333
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
It seems r197266 made some changes to jump table which then causes such error.
Here are the full configure options of my GCC:
terguo01@terry-pc01:bad$ ../../install-native/bin/arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=../../install-native/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/work/terguo01/build-toolchain/latest/install-native/lib/gcc/arm-none-eabi/4.9.0/lto-wrapper
Target: arm-none-eabi
Configured with: /work/terguo01/build-toolchain/latest/src/gcc/configure
--target=arm-none-eabi
--prefix=/work/terguo01/build-toolchain/latest/install-native
--libexecdir=/work/terguo01/build-toolchain/latest/install-native/lib
--infodir=/work/terguo01/build-toolchain/latest/install-native/share/doc/gcc-arm-none-eabi/info
--mandir=/work/terguo01/build-toolchain/latest/install-native/share/doc/gcc-arm-none-eabi/man
--htmldir=/work/terguo01/build-toolchain/latest/install-native/share/doc/gcc-arm-none-eabi/html
--pdfdir=/work/terguo01/build-toolchain/latest/install-native/share/doc/gcc-arm-none-eabi/pdf
--enable-languages=c --disable-decimal-float --disable-libffi --disable-libgomp
--disable-libmudflap --disable-libquadmath --disable-libssp
--disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads
--disable-tls --with-newlib --without-headers --with-gnu-as --with-gnu-ld
--with-python-dir=share/gcc-arm-none-eabi
--with-sysroot=/work/terguo01/build-toolchain/latest/install-native/arm-none-eabi
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-pkgversion='GNU Tools for ARM Embedded Processors' --disable-multilib
--with-mode=thumb --with-cpu=cortex-m4
Thread model: single
gcc version 4.9.0 20130330 (experimental) (GNU Tools for ARM Embedded
Processors)
Among them, the important ones are "--target=arm-none-eabi --disable-multilib
--with-mode=thumb --with-cpu=cortex-m4".
Here is my test case:
terguo01@terry-pc01:bad$ cat test.c
int
foo (int mode, int i)
{
int x;
switch (mode)
{
case 0:
x = i + 1;
break;
case 1:
x = i / 2;
break;
case 2:
x = i * 3;
break;
case 3:
x = i + 3;
break;
case 4:
x = i + 5;
break;
default:
x = i - 1;
}
return x;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/56809] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
@ 2013-04-02 8:12 ` terry.guo at arm dot com
2013-04-02 9:15 ` [Bug middle-end/56809] [4.9 Regression] " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: terry.guo at arm dot com @ 2013-04-02 8:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
--- Comment #1 from Terry Guo <terry.guo at arm dot com> 2013-04-02 08:12:32 UTC ---
The latest trunk code still has this issue.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
2013-04-02 8:12 ` [Bug c/56809] " terry.guo at arm dot com
@ 2013-04-02 9:15 ` rguenth at gcc dot gnu.org
2013-04-02 9:44 ` ktkachov at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-02 9:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |middle-end
Target Milestone|--- |4.9.0
Summary|Revision 197266 causes |[4.9 Regression] Revision
|trunk ICE for arm-none-eabi |197266 causes trunk ICE for
|targets |arm-none-eabi targets
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
2013-04-02 8:12 ` [Bug c/56809] " terry.guo at arm dot com
2013-04-02 9:15 ` [Bug middle-end/56809] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-04-02 9:44 ` ktkachov at gcc dot gnu.org
2013-04-02 11:05 ` ktkachov at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-02 9:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
--- Comment #2 from ktkachov at gcc dot gnu.org 2013-04-02 09:43:57 UTC ---
Similar problem on aarch64-none-elf. The testcase produces this ICE with
aarch64-none-elf-gcc ice.c -S
ice.c:28:1: internal compiler error: in aarch64_output_casesi, at
config/aarch64/aarch64.c:4098
}
^
0xb171fe aarch64_output_casesi(rtx_def**)
$SOURCE/gcc/gcc/config/aarch64/aarch64.c:4098
0x6b9579 final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
$SOURCE/gcc/gcc/final.c:2854
0x6b9faf final(rtx_def*, _IO_FILE*, int)
$SOURCE/gcc/gcc/final.c:1958
0x6ba1d9 rest_of_handle_final
$SOURCE/gcc/gcc/final.c:4333
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (2 preceding siblings ...)
2013-04-02 9:44 ` ktkachov at gcc dot gnu.org
@ 2013-04-02 11:05 ` ktkachov at gcc dot gnu.org
2013-04-03 11:22 ` steven at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-02 11:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|arm-none-eabi, |arm-none-eabi,
|aarch64-none-elf |aarch64-none-elf,
| |arm-none-linux-gnueabihf,
| |arm-none-linux-gnueabi
--- Comment #3 from ktkachov at gcc dot gnu.org 2013-04-02 11:05:00 UTC ---
Also, r197266 causes arm-none-linux-gnueabi targets to fail building glibc
with:
/tmp/ccJoCcvx.s: Assembler messages:
/tmp/ccJoCcvx.s:79: Error: bad immediate value for offset (4228)
make[2]: *** [$SOURCE/build-linux/obj/glibc/stdio-common/vfwscanf.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/ccRTqSyv.s: Assembler messages:
/tmp/ccRTqSyv.s:47: Error: bad immediate value for offset (4556)
make[2]: *** [$SOURCE/build-linux/obj/glibc/stdio-common/vfscanf.o] Error 1
/tmp/ccxxOo62.s: Assembler messages:
/tmp/ccxxOo62.s:72: Error: bad immediate value for offset (4244)
/tmp/ccxxOo62.s:88: Error: bad immediate value for offset (4208)
/tmp/ccxxOo62.s:95: Error: bad immediate value for offset (4196)
/tmp/ccxxOo62.s:127: Error: bad immediate value for offset (4228)
make[2]: *** [$SOURCE/build-linux/obj/glibc/stdio-common/vfwscanf.os] Error 1
/tmp/ccuTrEWO.s: Assembler messages:
/tmp/ccuTrEWO.s:57: Error: bad immediate value for offset (4136)
/tmp/ccuTrEWO.s:79: Error: bad immediate value for offset (4104)
make[2]: *** [$SOURCE/build-linux/obj/glibc/stdio-common/vfscanf.os] Error 1
make[2]: Leaving directory `$SOURCE/glibc/libc/stdio-common'
make[1]: *** [stdio-common/subdir_lib] Error 2
make[1]: Leaving directory `$SOURCE/glibc/libc'
make: *** [all] Error 2
make: Leaving directory `$SOURCE/build-linux/obj/glibc
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (3 preceding siblings ...)
2013-04-02 11:05 ` ktkachov at gcc dot gnu.org
@ 2013-04-03 11:22 ` steven at gcc dot gnu.org
2013-04-03 11:25 ` ktkachov at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu.org @ 2013-04-03 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed|2013-04-02 00:00:00 |2013-04-03
Ever Confirmed|0 |1
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2013-04-03 11:22:39 UTC ---
(In reply to comment #0)
> After build a tool chain from trunk@r197266 for arm-none-eabi, then use it to
> compile a simple case with switch statement, I got below ICE:
Does this still happen with r197307 or later?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (4 preceding siblings ...)
2013-04-03 11:22 ` steven at gcc dot gnu.org
@ 2013-04-03 11:25 ` ktkachov at gcc dot gnu.org
2013-04-03 12:47 ` [Bug target/56809] " steven at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-03 11:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
Last reconfirmed|2013-04-03 00:00:00 |2013-04-02 0:00
Ever Confirmed|1 |0
--- Comment #5 from ktkachov at gcc dot gnu.org 2013-04-03 11:25:41 UTC ---
(In reply to comment #4)
> Does this still happen with r197307 or later?
Yes, it still happens as of r197390.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (5 preceding siblings ...)
2013-04-03 11:25 ` ktkachov at gcc dot gnu.org
@ 2013-04-03 12:47 ` steven at gcc dot gnu.org
2013-04-03 12:51 ` [Bug middle-end/56809] " ktkachov at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu.org @ 2013-04-03 12:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed|2013-04-02 00:00:00 |2013-04-03
CC|steven at gcc dot gnu.org, |
|stevenb.gcc at gmail dot |
|com |
Component|middle-end |target
Ever Confirmed|0 |1
--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2013-04-03 12:47:20 UTC ---
Target bug, this is wrong:
rtx diff_vec = PATTERN (next_real_insn (operands[2]));
A jump_table_data is not a real insn. Before my patch this worked
by accident because the jump table would hide in a JUMP_INSN and
next_real_insn returned any JUMP_P insn.
Use next_active_insn instead.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (6 preceding siblings ...)
2013-04-03 12:47 ` [Bug target/56809] " steven at gcc dot gnu.org
@ 2013-04-03 12:51 ` ktkachov at gcc dot gnu.org
2013-04-03 12:52 ` [Bug target/56809] " ktkachov at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-03 12:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |UNCONFIRMED
Last reconfirmed|2013-04-03 00:00:00 |2013-04-02 0:00
Component|target |middle-end
Ever Confirmed|1 |0
--- Comment #7 from ktkachov at gcc dot gnu.org 2013-04-03 12:51:10 UTC ---
Thanks, that seems to fix the problem.
Now testing a patch...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (7 preceding siblings ...)
2013-04-03 12:51 ` [Bug middle-end/56809] " ktkachov at gcc dot gnu.org
@ 2013-04-03 12:52 ` ktkachov at gcc dot gnu.org
2013-04-03 13:10 ` steven at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-03 12:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed|2013-04-02 00:00:00 |2013-04-03
Component|middle-end |target
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (8 preceding siblings ...)
2013-04-03 12:52 ` [Bug target/56809] " ktkachov at gcc dot gnu.org
@ 2013-04-03 13:10 ` steven at gcc dot gnu.org
2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu.org @ 2013-04-03 13:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
--- Comment #8 from Steven Bosscher <steven at gcc dot gnu.org> 2013-04-03 13:10:41 UTC ---
While at it, you may also want to clean up the duplicate
define_expand for "cbranch<mode>4".
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (9 preceding siblings ...)
2013-04-03 13:10 ` steven at gcc dot gnu.org
@ 2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-03 16:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #10 from ktkachov at gcc dot gnu.org 2013-04-03 16:42:44 UTC ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/56809] [4.9 Regression] Revision 197266 causes trunk ICE for arm-none-eabi targets
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
` (10 preceding siblings ...)
2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
@ 2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-04-03 16:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56809
--- Comment #9 from ktkachov at gcc dot gnu.org 2013-04-03 16:42:18 UTC ---
r197425 for arm
2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/56809
* config/arm/arm.c (is_jump_table): Use next_active_insn instead of
next_real_insn.
(thumb1_output_casesi): Likewise.
(thumb2_output_casesi): Likewise.
* gcc.dg/pr56809.c: New testcase.
and
r197434 for aarch64
2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/56809
* config/aarch64/aarch64.c (is_jump_table): Use next_active_insn
instead of next_real_insn.
should fix it.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-04-03 16:42 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-02 8:03 [Bug c/56809] New: Revision 197266 causes trunk ICE for arm-none-eabi targets terry.guo at arm dot com
2013-04-02 8:12 ` [Bug c/56809] " terry.guo at arm dot com
2013-04-02 9:15 ` [Bug middle-end/56809] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-04-02 9:44 ` ktkachov at gcc dot gnu.org
2013-04-02 11:05 ` ktkachov at gcc dot gnu.org
2013-04-03 11:22 ` steven at gcc dot gnu.org
2013-04-03 11:25 ` ktkachov at gcc dot gnu.org
2013-04-03 12:47 ` [Bug target/56809] " steven at gcc dot gnu.org
2013-04-03 12:51 ` [Bug middle-end/56809] " ktkachov at gcc dot gnu.org
2013-04-03 12:52 ` [Bug target/56809] " ktkachov at gcc dot gnu.org
2013-04-03 13:10 ` steven at gcc dot gnu.org
2013-04-03 16:42 ` ktkachov at gcc dot gnu.org
2013-04-03 16:42 ` ktkachov at gcc dot gnu.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).