http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60376
Bug ID: 60376 Summary: [4.9 Regression] ICE with invalid use of using Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid testcase (compiled with "-std=c++1y") triggers an ICE on trunk: ==================================== struct A { int foo(); }; template<typename> void bar() { using (A().foo); } ==================================== bug.cc: In function 'void bar()': bug.cc:8:9: error: expected nested-name-specifier before '(' token using (A().foo); ^ bug.cc:8:9: error: expected unqualified-id before '(' token bug.cc:8:9: error: expected ';' before '(' token bug.cc:8:18: internal compiler error: in type_dependent_expression_p, at cp/pt.c:20901 using (A().foo); ^ 0x6049a1 type_dependent_expression_p(tree_node*) ../../gcc/gcc/cp/pt.c:20900 0x72d994 finish_expr_stmt(tree_node*) ../../gcc/gcc/cp/semantics.c:686 0x6b4788 cp_parser_statement ../../gcc/gcc/cp/parser.c:9473 0x6b5559 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9745 0x6b56c6 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9699 0x6c667b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18694 0x6c667b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18730 0x6cdc12 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22843 0x6ceab1 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22755 0x6ceab1 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16589 0x6cee4a cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:23164 0x6cf134 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22966 0x6da4d9 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10947 0x6d8fc8 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10869 0x6da87a cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4014 0x6da87a c_parse_file() ../../gcc/gcc/cp/parser.c:31590 0x7f9fe3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, [etc.]