http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58834
Bug ID: 58834 Summary: [4.9 Regression] ICE on __builtin_shuffle within template function 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 on trunk (since at least GCC 4.9.0 20130920): ============================================= template<typename> void foo() { int i __attribute__((vector_size(8))); __builtin_shuffle(i, i); } ============================================= bug.cc: In function 'void foo()': bug.cc:4:25: internal compiler error: Segmentation fault __builtin_shuffle(i, i); ^ 0xb16cef crash_signal ../../gcc/gcc/toplev.c:335 0x59bb7a identifier_p ../../gcc/gcc/cp/cp-tree.h:255 0x59bb7a type_dependent_expression_p(tree_node*) ../../gcc/gcc/cp/pt.c:20517 0x677b70 build_x_vec_perm_expr(unsigned int, tree_node*, tree_node*, tree_node*, int) ../../gcc/gcc/cp/typeck.c:4945 0x64e2f0 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5763 0x6506fd cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7066 0x6512cf cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7758 0x6517af cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7996 0x653c93 cp_parser_expression ../../gcc/gcc/cp/parser.c:8158 0x65449e cp_parser_expression ../../gcc/gcc/cp/parser.c:8197 0x65449e cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9488 0x649737 cp_parser_statement ../../gcc/gcc/cp/parser.c:9339 0x64aa22 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9611 0x64ab66 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9565 0x65e1cb cp_parser_function_body ../../gcc/gcc/cp/parser.c:18408 0x65e1cb cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18444 0x6625df cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22452 0x6633b2 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22373 0x6633b2 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16419 0x663754 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:22766 Please submit a full bug report, [etc.]