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

            Bug ID: 98636
           Summary: [ARM] ICE on passing incompatible options for fp16
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prathamesh3492 at gcc dot gnu.org
  Target Milestone: ---

For any test-case, that includes arm_neon.h, for instance:
#include <arm_neon.h>
void f() {}

Passing incompatible fp16 format seems to result in ICE.
For example, passing -mfp16-format=alternative resulted in:
In file included from test.c:1:
../arm-stage1-build/gcc/include/arm_neon.h:18122:9: error: selected fp16
options are incompatible
18122 | #pragma GCC target ("arch=armv8.2-a+fp16fml")
      |         ^~~
../arm-stage1-build/gcc/include/arm_neon.h:18324:9: internal compiler error:
‘global_options’ are modified in local context
18324 | #pragma GCC pop_options
      |         ^~~
0xdcb103 cl_optimization_compare(gcc_options*, gcc_options*)
       
/home/bilbo/gnu-toolchain/gcc/vfma/arm-stage1-build/gcc/options-save.c:12555
0x97d54d handle_pragma_pop_options
        ../../gcc/gcc/c-family/c-pragma.c:1092
0x8f3cbb c_parser_pragma
        ../../gcc/gcc/c/c-parser.c:12525
0x91aab5 c_parser_external_declaration
        ../../gcc/gcc/c/c-parser.c:1758
0x91b269 c_parser_translation_unit
        ../../gcc/gcc/c/c-parser.c:1650
0x91b269 c_parse_file()
        ../../gcc/gcc/c/c-parser.c:21935
0x97b045 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1211


My built version is configured as:
Using built-in specs.
COLLECT_GCC=../arm-stage1-build/gcc/xgcc
Target: arm-linux-gnueabihf
Configured with: ../gcc/configure --enable-languages=c,c++ --disable-bootstrap
--target=arm-linux-gnueabihf --with-arch=armv7-a --with-fpu=neon
--with-float=hard --with-mode=thumb
--with-sysroot=/home/bilbo/gnu-toolchain/sysroots/arm-linux-gnueabihf
--disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20210111 (experimental) (GCC)

Thanks,
Prathamesh

Reply via email to