http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59633
Bug ID: 59633 Summary: [4.7/4.8/4.9 Regression] ICE with __attribute((vector_size(...))) for enum Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.4.0: ============================================================== typedef enum { e } T __attribute__((vector_size(8))); void foo(T t) {} ============================================================== bug.cc:3:6: internal compiler error: Segmentation fault void foo(T t) {} ^ 0xb75baf crash_signal ../../gcc/gcc/toplev.c:336 0x734388 decl_mangling_context ../../gcc/gcc/cp/mangle.c:755 0x73a143 write_name ../../gcc/gcc/cp/mangle.c:794 0x73de43 write_class_enum_type ../../gcc/gcc/cp/mangle.c:2509 0x73de43 write_type ../../gcc/gcc/cp/mangle.c:1976 0x73dc6c write_type ../../gcc/gcc/cp/mangle.c:2047 0x73f897 write_method_parms ../../gcc/gcc/cp/mangle.c:2496 0x73fb9c write_bare_function_type ../../gcc/gcc/cp/mangle.c:2438 0x743398 mangle_decl_string ../../gcc/gcc/cp/mangle.c:3433 0x743577 get_mangled_id ../../gcc/gcc/cp/mangle.c:3455 0x743577 mangle_decl(tree_node*) ../../gcc/gcc/cp/mangle.c:3478 0xd91200 decl_assembler_name(tree_node*) ../../gcc/gcc/tree.c:600 0xddccf1 make_decl_rtl(tree_node*) ../../gcc/gcc/varasm.c:1274 0xddd96d notice_global_symbol(tree_node*) ../../gcc/gcc/varasm.c:1548 0x859ed5 cgraph_finalize_function(tree_node*, bool) ../../gcc/gcc/cgraphunit.c:434 0x6feb1f expand_or_defer_fn(tree_node*) ../../gcc/gcc/cp/semantics.c:3981 0x693527 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22686 0x694394 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22590 0x694394 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16588 0x69562f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11200 Please submit a full bug report, [etc.] The C-frontend compiles the code without issues.