https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70894

            Bug ID: 70894
           Summary: ICE when using neon intrinsic with mabi=apcs-gnu
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: g.hoogewerf at gmail dot com
  Target Milestone: ---

The following test case triggers an ICE on several versions of GCC, including
5.3.0 and 4.9.3.

void crashFunction(unsigned char val)
{
    __builtin_neon_vdup_nv16qi ((__builtin_neon_qi) val);
}


To trigger the ICE, the source should be compiled with:
arm-none-eabi-gcc -c neon.c -mfpu=neon -mfloat-abi=softfp -mabi=apcs-gnu


When running with -v -save-temps, the output is:

Using built-in specs.
COLLECT_GCC=./GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/bin/arm-none-eabi-gcc
Target: arm-none-eabi
Configured with: /home/ghoogewerf/GccBuild/src/gcc/configure
--prefix=/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-eabi
--enable-languages=c,c++ --disable-libssp --disable-multilib --disable-nls
--disable-fixed-point --disable-decimal-float --disable-lto --with-newlib
--with-headers=/home/ghoogewerf/GccBuild/src/newlib/newlib/libc/include
Thread model: single
gcc version 5.3.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-mfpu=neon' '-mfloat-abi=softfp'
'-mabi=apcs-gnu'

/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/libexec/gcc/arm-none-eabi/5.3.0/cc1
-E -quiet -v -D__USES_INITFINI__ neon.c -mfpu=neon -mfloat-abi=softfp
-mabi=apcs-gnu -fpch-preprocess -o neon.i
#include "..." search starts here:
#include <...> search starts here:

/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/lib/gcc/arm-none-eabi/5.3.0/include

/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/lib/gcc/arm-none-eabi/5.3.0/include-fixed

/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/sys-include

/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-mfpu=neon' '-mfloat-abi=softfp'
'-mabi=apcs-gnu'

/home/ghoogewerf/GccBuild/build/arm-none-eabi-newlib/tools/i686-pc-linux-gnu/arm-none-eabi/libexec/gcc/arm-none-eabi/5.3.0/cc1
-fpreprocessed neon.i -quiet -dumpbase neon.c -mfpu=neon -mfloat-abi=softfp
-mabi=apcs-gnu -auxbase neon -version -o neon.s
GNU C11 (GCC) version 5.3.0 (arm-none-eabi)
        compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (GCC) version 5.3.0 (arm-none-eabi)
        compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 46d53ae1749a0f498e12cc1c3bd3e85f
neon.c: In function 'crashFunction':
neon.c:4:5: internal compiler error: in copy_to_mode_reg, at explow.c:617
     __builtin_neon_vdup_nv16qi ((__builtin_neon_qi) val);
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Thanks,
G. Hoogewerf

Reply via email to