This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59956] internal compiler error: unexpected expression âP_Sâ of kind template_parm_index
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Jan 2014 13:17:17 +0000
- Subject: [Bug c++/59956] internal compiler error: unexpected expression âP_Sâ of kind template_parm_index
- Auto-submitted: auto-generated
- References: <bug-59956-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59956
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-27
CC| |trippels at gcc dot gnu.org
Target Milestone|--- |4.8.3
Ever confirmed|0 |1
Known to fail| |4.8.3, 4.9.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Confirmed.
markus@x4 tmp % cat test.ii
template <int> struct A;
template <int> class B {
template <int A_S> friend void A<A_S>::impl();
};
B<0> a;
markus@x4 tmp % g++ test.ii
test.ii: In instantiation of âclass B<0>â:
test.ii:5:6: required from here
test.ii:3:34: internal compiler error: unexpected expression âA_Sâ of kind
template_parm_index
template <int A_S> friend void A<A_S>::impl();
^
0x6e2af5 cxx_eval_constant_expression
../../gcc/gcc/cp/semantics.c:9784
0x6e5875 cxx_eval_outermost_constant_expr
../../gcc/gcc/cp/semantics.c:9804
0x6e854b maybe_constant_value(tree_node*)
../../gcc/gcc/cp/semantics.c:9914
0x5c6512 convert_nontype_argument
../../gcc/gcc/cp/pt.c:5671
0x5c6512 convert_template_argument
../../gcc/gcc/cp/pt.c:6477
0x5be4a0 coerce_template_parms
../../gcc/gcc/cp/pt.c:6851
0x5c8369 lookup_template_class_1
../../gcc/gcc/cp/pt.c:7422
0x5c8369 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:7720
0x5cdb73 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:10023
0x5d2705 tsubst_decl
../../gcc/gcc/cp/pt.c:10401
0x5c025f tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11349
0x5eed53 tsubst_friend_function
../../gcc/gcc/cp/pt.c:8211
0x5eed53 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:9176
0x5eed53 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:9262
0x680473 complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:134
0x569418 start_decl_1(tree_node*, bool)
../../gcc/gcc/cp/decl.c:4719
0x5922c7 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
../../gcc/gcc/cp/decl.c:4682
0x66c6fe cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16710
0x66e189 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11217
0x651463 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11098
Please submit a full bug report,