This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59114] New: [c++1y] ICE using auto in conversion operator
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Nov 2013 14:39:04 +0000
- Subject: [Bug c++/59114] New: [c++1y] ICE using auto in conversion operator
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59114
Bug ID: 59114
Summary: [c++1y] ICE using auto in conversion operator
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 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.]