https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117408
Bug ID: 117408 Summary: ICE on `#pragma arm "arm_mve.h" false` Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: azoff at gcc dot gnu.org Target Milestone: --- Starting in r14-435-g00d97bf3b5a, GCC ICEs if `#pragma arm "arm_mve.h" false` or `#pragma arm "arm_mve.h" true` is issued in a compile unit that does not have `#pragma arm "arm_mve_types.h"` before. Reproducer: /* { dg-do compile } */ /* { dg-require-effective-target arm_v8_1m_mve_ok } */ /* { dg-add-options arm_v8_1m_mve } */ /* It doesn't really matter if this produces errors missing types, but it mustn't trigger an ICE. */ #pragma GCC arm "arm_mve.h" false /* { dg-error "this definition requires MVE types" } */ Example ICE: foo.c:7:9: internal compiler error: Segmentation fault 7 | #pragma GCC arm "arm_mve.h" false /* { dg-error "this definition requires MVE types" } */ | ^~~ 0x2ef975e internal_error(char const*, ...) .../gcc/diagnostic-global-context.cc:518 0x17a64af crash_signal .../gcc/toplev.cc:323 0x7f672e74908f ??? /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x1c06f35 build_function_type(tree_node*, tree_node*, bool) .../gcc/tree.cc:7534 0x1c07612 build_function_type_array_1 .../gcc/tree.cc:7661 0x1c07643 build_function_type_array(tree_node*, int, tree_node**) .../gcc/tree.cc:7671 0x1ec81cd arm_mve::function_builder::add_unique_function(arm_mve::function_instance const&, tree_node*, vec<tree_node*, va_heap, vl_ptr>&, bool, bool, bool) .../gcc/config/arm/arm-mve-builtins.cc:980 0x1ecf983 build_one .../gcc/config/arm/arm-mve-builtins-shapes.cc:252 0x1ecfac5 build_all .../gcc/config/arm/arm-mve-builtins-shapes.cc:282 0x1ed00f2 arm_mve::binary_acca_int32_def::build(arm_mve::function_builder&, arm_mve::function_group_info const&, bool) const .../gcc/config/arm/arm-mve-builtins-shapes.cc:511 0x1ec89b8 arm_mve::function_builder::register_function_group(arm_mve::function_group_info const&, bool) .../gcc/config/arm/arm-mve-builtins.cc:1113 0x1ec6d1f arm_mve::handle_arm_mve_h(bool) .../gcc/config/arm/arm-mve-builtins.cc:542 0xf5aee1 arm_pragma_arm .../gcc/config/arm/arm-c.cc:154 0xf11057 c_invoke_pragma_handler(unsigned int) .../gcc/c-family/c-pragma.cc:1743 0xe215f4 c_parser_pragma .../gcc/c/c-parser.cc:15400 0xdf94d3 c_parser_external_declaration .../gcc/c/c-parser.cc:2044 0xdf8f7e c_parser_translation_unit .../gcc/c/c-parser.cc:1917 0xe547e2 c_parse_file() .../gcc/c/c-parser.cc:27866 0xf094a6 c_common_parse_file() .../gcc/c-family/c-opts.cc:1352 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.