http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56732

             Bug #: 56732
           Summary: ICE
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: diffg...@gmail.com


Created attachment 29723
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29723
Preprocessed source code

I was trying to compile Ndless with GCC 4.8.0 (configured to cross-compile to
arm-none-eabi), and it fails on this file. This compiled in GCC 4.7.2. It seems
that it compiles only if I remove the optimization flag or change it to -O1,
but not with -O2, -O3, or -Os.

The command line used to compile it is:
"/usr/local/bin/arm-none-eabi-gcc" -mcpu=arm7tdmi -I
"/home/rajiv/.ndless/include" -I
"/home/rajiv/ndless/ndless/Ndless-SDK/ndless/bin/../include" -I
"/home/rajiv/ndless/ndless/Ndless-SDK/ndless/bin/../3rd/nSDL/include" -I
"/home/rajiv/ndless/ndless/Ndless-SDK/ndless/bin/../3rd/nspireio/include" -fpic
-fno-builtin -D _TINSPIRE -Os -nostdlib -Wall -W -Wno-strict-aliasing -c
ploaderhook.c

The error occurs at function plh_hook:

ploaderhook.c: In function ‘plh_hook’:
ploaderhook.c:156:1: internal compiler error: in advance_target_bb, at
sched-rgn.c:3552
 HOOK_DEFINE(plh_hook) {
 ^
0x78f082 advance_target_bb
        ../../gcc-4.8.0/gcc/sched-rgn.c:3551
0x78f082 advance_target_bb
        ../../gcc-4.8.0/gcc/sched-rgn.c:3546
0xb35ec2 commit_schedule
        ../../gcc-4.8.0/gcc/haifa-sched.c:5619
0xb40292 schedule_block(basic_block_def**, void*)
        ../../gcc-4.8.0/gcc/haifa-sched.c:6416
0x7946aa schedule_region
        ../../gcc-4.8.0/gcc/sched-rgn.c:3048
0x7946aa schedule_insns
        ../../gcc-4.8.0/gcc/sched-rgn.c:3384
0x7946aa schedule_insns()
        ../../gcc-4.8.0/gcc/sched-rgn.c:3363
0x794a1c rest_of_handle_sched2
        ../../gcc-4.8.0/gcc/sched-rgn.c:3608
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.




Operating System: Ubuntu 12.10 x86_64

Output of arm-none-eabi-gcc -v:

Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/arm-none-eabi/4.8.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-4.8.0/configure --target=arm-none-eabi
--prefix=/usr/local --enable-interwork --enable-multilib
--enable-languages=c,c++ --with-system-zlib --with-newlib --disable-shared
--with-gnu-as --with-gnu-ld --with-float=soft --disable-werror
Thread model: single
gcc version 4.8.0 (GCC)

I have attached the preprocessed source code.

-Rajiv

Reply via email to