https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114634
Bug ID: 114634 Summary: Crash Issue Encountered in GCC Compilation of Template Code with Aligned Attribute Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- The following code snippet triggers a crash issue: ============================================ $ cat bug.cc template <class> class A { enum { e __attribute__ ((aligned(16))) }; }; ============================================ The error output is: ============================================ $ gcc bug.cc internal compiler error: Segmentation fault 2 | { enum { e __attribute__ ((aligned(16))) }; }; | ^ 0xedc273 crash_signal ../../gcc/toplev.cc:319 0x957dd7 diag_attr_exclusions ../../gcc/attribs.cc:471 0x95a5f7 decl_attributes(tree_node**, tree_node*, int, tree_node*) ../../gcc/attribs.cc:867 0x7ecc0e cplus_decl_attributes(tree_node**, tree_node*, int) ../../gcc/cp/decl2.cc:1880 0x7de1d1 build_enumerator(tree_node*, tree_node*, tree_node*, tree_node*, unsigned int) ../../gcc/cp/decl.cc:17543 0x890bdc cp_parser_enumerator_definition ../../gcc/cp/parser.cc:21903 0x890bdc cp_parser_enumerator_list ../../gcc/cp/parser.cc:21823 0x890bdc cp_parser_enum_specifier ../../gcc/cp/parser.cc:21754 0x890bdc cp_parser_type_specifier ../../gcc/cp/parser.cc:20034 0x8916f1 cp_parser_decl_specifier_seq ../../gcc/cp/parser.cc:16590 0x8bfc4f cp_parser_member_declaration ../../gcc/cp/parser.cc:27984 0x88dec1 cp_parser_member_specification_opt ../../gcc/cp/parser.cc:27840 0x88dec1 cp_parser_class_specifier ../../gcc/cp/parser.cc:26845 0x890171 cp_parser_type_specifier ../../gcc/cp/parser.cc:20064 0x8916f1 cp_parser_decl_specifier_seq ../../gcc/cp/parser.cc:16590 0x8bd774 cp_parser_single_declaration ../../gcc/cp/parser.cc:33143 0x8bdbd3 cp_parser_template_declaration_after_parameters ../../gcc/cp/parser.cc:32799 0x8be4b9 cp_parser_explicit_template_declaration ../../gcc/cp/parser.cc:33072 0x8be4b9 cp_parser_template_declaration_after_export ../../gcc/cp/parser.cc:33091 0x8c1fad cp_parser_declaration ../../gcc/cp/parser.cc:15502 ============================================ The GCC version: ============================================ $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/cTest/gcc/myinstall/libexec/gcc/x86_64-linux-gnu/14.0.1/lto-wrapper Target: x86_64-linux-gnu Configured with: ../configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-checking=no --enable-languages=c,c++ --disable-multilib --prefix=/home/cTest/gcc/myinstall --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.1 20240329 (experimental) (GCC) ============================================