The following invalid code snippet (compiled with "-std=c++1y") triggers an ICE since GCC 4.8.0: ======================================= template<int> struct A { template<typename T> operator T(); }; void foo() { A<0>().operator auto(); } ======================================= bug.cc: In function 'void foo()': bug.cc:8:24: internal compiler error: in push_access_scope, at cp/pt.c:220 A<0>().operator auto(); ^ 0x591647 push_access_scope ../../gcc/gcc/cp/pt.c:219 0x5e266c fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15679 0x54d05c add_template_candidate_real ../../gcc/gcc/cp/call.c:2923 0x548ce9 add_template_candidate ../../gcc/gcc/cp/call.c:3020 0x548ce9 add_candidates ../../gcc/gcc/cp/call.c:5075 0x550617 build_new_method_call_1 ../../gcc/gcc/cp/call.c:7698 0x550617 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7884 0x652842 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6065 0x6548cd cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7100 0x65543f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7804 0x65590f cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8042 0x657e63 cp_parser_expression ../../gcc/gcc/cp/parser.c:8204 0x65865e cp_parser_expression ../../gcc/gcc/cp/parser.c:8243 0x65865e cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9542 0x64df67 cp_parser_statement ../../gcc/gcc/cp/parser.c:9393 0x64ec49 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9665 0x64edbe cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9619 0x66248b cp_parser_function_body ../../gcc/gcc/cp/parser.c:18525 0x66248b cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18561 0x6662c3 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22593 Please submit a full bug report, [etc.]
The testcase doesn't fail anymore since 2014-03-08. Jason, I suspect that this is due to your changes on the day before. Do you want to add this testcase to the testsuite?
This one got fixed with r208414.
Let's add the testcase and close the bug.
Author: paolo Date: Wed Nov 26 16:06:53 2014 New Revision: 218090 URL: https://gcc.gnu.org/viewcvs?rev=218090&root=gcc&view=rev Log: 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com> PR c++/59114 * g++.dg/cpp0x/auto43.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/auto43.C Modified: trunk/gcc/testsuite/ChangeLog
Done.