[Bug c++/63415] internal compiler error: unexpected expression ‘static_cast?=<int>(std::is same<T, A1>{})=?UTF-8?Q?’ of kind static_cast_expr
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 30 12:51:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63415
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-09-30
CC| |trippels at gcc dot gnu.org
Target Milestone|--- |4.9.2
Ever confirmed|0 |1
Known to fail| |4.9.1, 5.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat booo.ii
template <typename T>
struct A {
static constexpr int value = int(T{});
};
markus@x4 tmp % g++ -std=c++11 booo.ii
booo.ii:3:39: internal compiler error: unexpected expression ‘(int)(T{})’ of
kind cast_expr
static constexpr int value = int(T{});
^
0x713c8e cxx_eval_constant_expression
../../gcc/gcc/cp/semantics.c:9990
0x716b15 cxx_eval_outermost_constant_expr
../../gcc/gcc/cp/semantics.c:10010
0x624e74 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
../../gcc/gcc/cp/typeck2.c:810
0x5971d4 check_initializer
../../gcc/gcc/cp/decl.c:5877
0x5a852f cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6399
0x65c1b6 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
../../gcc/gcc/cp/decl2.c:1020
0x69e5e9 cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:20881
0x67a2dc cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:20429
0x67a2dc cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19619
0x67ccb0 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19855
0x67ccb0 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14531
0x697c60 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11772
0x69cd13 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:23504
0x69d1f4 cp_parser_template_declaration_after_export
../../gcc/gcc/cp/parser.c:23373
0x6a9919 cp_parser_declaration
../../gcc/gcc/cp/parser.c:11172
0x6a83d8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:11094
0x6a9cc3 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4059
0x6a9cc3 c_parse_file()
../../gcc/gcc/cp/parser.c:32089
0x7d11e2 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1043
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list