Bug 48183 - ICE [arm] immed_double_const at emit-rtl.c (-mfpu=neon -g -O1)
Summary: ICE [arm] immed_double_const at emit-rtl.c (-mfpu=neon -g -O1)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2011-03-18 15:47 UTC by Juha Kallioinen
Modified: 2014-07-09 08:35 UTC (History)
1 user (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Known to work:
Known to fail: 4.6.0
Last reconfirmed: 2011-04-04 20:54:30


Attachments
pre-processed source (22.63 KB, application/x-gzip)
2011-03-18 15:47 UTC, Juha Kallioinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juha Kallioinen 2011-03-18 15:47:50 UTC
Created attachment 23707 [details]
pre-processed source

When compiling the attached pre-processed source for arm (-march=armv7-a -mtune=cortex-a8) and using options -mfpu=neon -g -O1 I get an ICE.

kaltsi@kaltsnatty:~/tmp/ice$ arm-linux-gnueabi-gcc-4.5 -mfpu=neon -O1 -g -c emit-rtl-ice.i
optimized.c: In function ‘move_16bit_to_32bit’:
optimized.c:4:6: internal compiler error: in immed_double_const, at emit-rtl.c:552
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.

This does not happen if I leave the -g option out.

Also reported to linaro: https://bugs.launchpad.net/gcc-linaro/+bug/736007
Comment 1 Havard Graff 2011-12-01 19:58:11 UTC
I have some additional info related to this bug:

If I compile the following:

#include "arm_neon.h"
#include "stdlib.h"

int main ()
{
   float r [] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
   float32x4x2_t d;
   d = vld2q_f32 (r);
   vst2q_f32 (r, d);
   return 0;
}

using: arm-linux-androideabi-gcc test.c -mfloat-abi=softfp -mfpu=neon -g -O1

I get:
test.c: In function 'main':
test.c:4:5: internal compiler error: in immed_double_const, at emit-rtl.c:550
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

However, if I comment out vst2q_f32 (r, d);, the problem goes away. Also by not using -g or -O1.

$ arm-linux-androideabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/Users/havard.graff/Code/android-ndk-r7/toolchains/arm-linux-androideabi-4.6.2/prebuilt/darwin-x86/libexec/gcc/arm-linux-androideabi/4.6.2/lto-wrapper
Target: arm-linux-androideabi
Configured with: /Users/havard.graff/Code/selfbuilt_android_toolchain/build/../gcc/gcc-4.6.2/configure --prefix=/Users/havard.graff/Code/android-ndk-r7/toolchains/arm-linux-androideabi-4.6.2/prebuilt/darwin-x86 --target=arm-linux-androideabi --host=i686-apple-darwin --build=i686-apple-darwin --with-gnu-as --with-gnu-ld --enable-languages=c,c++,objc --with-gmp=/tmp/ndk-havard.graff/build/toolchain/temp-install --with-mpfr=/tmp/ndk-havard.graff/build/toolchain/temp-install --with-mpc=/tmp/ndk-havard.graff/build/toolchain/temp-install --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-sjlj-exceptions --disable-shared --disable-tls --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --disable-hosted-libstdcxx --enable-cxx-flags='-fexceptions -frtti' --enable-initfini-array --disable-nls --prefix=/Users/havard.graff/Code/android-ndk-r7/toolchains/arm-linux-androideabi-4.6.2/prebuilt/darwin-x86 --with-sysroot=/Users/havard.graff/Code/android-ndk-r7/toolchains/arm-linux-androideabi-4.6.2/prebuilt/darwin-x86/sysroot --with-binutils-version=2.22.51 --with-mpfr-version=2.4.1 --with-gmp-version=4.2.4 --with-gcc-version=4.6.2 --with-gdb-version=6.6 --with-arch=armv5te --program-transform-name='s,^,arm-linux-androideabi-,'
Thread model: posix
gcc version 4.6.2 (GCC)
Comment 2 ktkachov 2014-07-09 08:35:09 UTC
From what I can see in the Linaro report this has been fixed.
I can't reproduce it on 4.10 trunk or 4.8.3