https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68895
Bug ID: 68895 Summary: [ARM] ICE with target attributes Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: chrbr at gcc dot gnu.org Reporter: clyon at gcc dot gnu.org Target Milestone: --- Target: arm Hi, While modifying some tests to update my testsuite cleanup proposal around target attributes testing (https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03356.html), I am facing an ICE. I've modified attr-neon2.c like that: ====================================== /* { dg-do compile } */ /* { dg-require-effective-target arm_neon_ok } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_fp } */ /* Reset fpu to a value compatible with the next pragmas. */ #pragma GCC target ("fpu=vfp") #pragma GCC push_options #pragma GCC target ("fpu=neon") #include <arm_neon.h> /* Check that pragma target is used. */ int8x8_t my (int8x8_t __a, int8x8_t __b) { return __a + __b; } #pragma GCC pop_options /* Check that command line option is restored. */ int8x8_t my1 (int8x8_t __a, int8x8_t __b) { return __a + __b; } /* { dg-final { scan-assembler-times "\.fpu vfp" 1 } } */ /* { dg-final { scan-assembler-times "\.fpu neon" 1 } } */ /* { dg-final { scan-assembler "vadd" } } */ ============================================== That is, I added: #pragma GCC target ("fpu=vfp") #pragma GCC push_options at the beginning, and I replaced reset_options with pop_options. I am now seeing: spawn /home/christophe.lyon/src/GCC/builds/gcc-fsf-arm-attribs/obj-arm-none-linux-gnueabihf/gcc3/gcc/xgcc -B/home/christophe.lyon/src/GCC/builds/gcc-fsf-arm-attribs/obj-arm-none-linux-gnueabihf/gcc3/gcc/ /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/testsuite/gcc.target/arm/attr-neon2.c -fno-diagnos\ tics-show-caret -fdiagnostics-color=never -O2 -ffat-lto-objects -DSTACK_SIZE=16384 -S -o attr-neon2.s^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/testsuite/gcc.target/arm/attr-neon2.c: In function 'my':^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/testsuite/gcc.target/arm/attr-neon2.c:16:1: internal compiler error: in set_rtl, at cfgexpand.c:215^M 0x82badb set_rtl^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/cfgexpand.c:209^M 0x82edc4 set_parm_rtl(tree_node*, rtx_def*)^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/cfgexpand.c:1259^M 0x9ebe67 assign_parm_setup_reg^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/function.c:3339^M 0x9ed675 assign_parms^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/function.c:3766^M 0x9f17af expand_function_start(tree_node*)^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/function.c:5200^M 0x83f0ce execute^M /home/christophe.lyon/src/GCC/sources/gcc-fsf/arm-attribs/gcc/cfgexpand.c:6210^M Please submit a full bug report,^M My GCC was configured with: --target=arm-none-linux-gnueabihf --with-float=hard --with-mode=arm --with-cpu=cortex-a9 --with-fpu=neon