This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79606] New: [7 Regression] ICE with NSDMI and this pointer in template
- 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: Sun, 19 Feb 2017 22:20:04 +0000
- Subject: [Bug c++/79606] New: [7 Regression] ICE with NSDMI and this pointer in template
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79606
Bug ID: 79606
Summary: [7 Regression] ICE with NSDMI and this pointer in
template
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
Target Milestone: ---
The following valid code snippet triggers an ICE on trunk:
=============================
struct A
{
int i = 0;
};
template<int> struct B : A
{
int j = this->i;
};
B<0> b;
=============================
bug.cc:8:17: internal compiler error: in build_simple_base_path, at
cp/class.c:597
int j = this->i;
^
0x6b87f3 build_simple_base_path
../../gcc/gcc/cp/class.c:597
0x6d7c8f build_base_path(tree_code, tree_node*, tree_node*, int, int)
../../gcc/gcc/cp/class.c:430
0x763f22 build_class_member_access_expr(cp_expr, tree_node*, tree_node*, bool,
int)
../../gcc/gcc/cp/typeck.c:2413
0x764b35 finish_class_member_access_expr(cp_expr, tree_node*, bool, int)
../../gcc/gcc/cp/typeck.c:2898
0x72e620 cp_parser_postfix_dot_deref_expression
../../gcc/gcc/cp/parser.c:7467
0x721abd cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:7044
0x722ebd cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:8124
0x723e13 cp_parser_cast_expression
../../gcc/gcc/cp/parser.c:8801
0x724567 cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:8902
0x724e34 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:9189
0x725237 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:9459
0x726154 cp_parser_initializer_clause
../../gcc/gcc/cp/parser.c:21586
0x72739b cp_parser_initializer
../../gcc/gcc/cp/parser.c:21526
0x7274a1 cp_parser_late_parse_one_default_arg
../../gcc/gcc/cp/parser.c:27205
0x71ac35 cp_parser_late_parsing_nsdmi
../../gcc/gcc/cp/parser.c:27253
0x71ac35 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:22308
0x71cc19 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:22361
0x71cc19 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:16434
0x71db0a cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:13347
0x719305 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:26628
Please submit a full bug report, [etc.]