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

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).