Commit ff5c3c9d by Paolo Carlini Committed by Paolo Carlini

re PR c++/87324 (g++ ICE with overriding initializers: Segmentation fault)

/cp
2018-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/87324
	* parser.c (cp_parser_initializer_list): Assign error_mark_node
	to the index upon error.

/testsuite
2018-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/87324
	* g++.dg/cpp0x/desig5.C: New.

From-SVN: r264428
parent ad9fe5f3
2018-09-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/87324
* parser.c (cp_parser_initializer_list): Assign error_mark_node
to the index upon error.
2018-09-19 Marek Polacek <polacek@redhat.com>
PR c++/87357 - missing -Wconversion warning
......
......@@ -22394,7 +22394,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p)
"%<.%s%> designator used multiple times in "
"the same initializer list",
IDENTIFIER_POINTER (designator));
(*v)[i].index = NULL_TREE;
(*v)[i].index = error_mark_node;
}
else
IDENTIFIER_MARKED (designator) = 1;
2018-09-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/87324
* g++.dg/cpp0x/desig5.C: New.
2018-09-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84109
......
// PR c++/87324
// { dg-do compile { target c++11 } }
// { dg-options "-Wno-pedantic" }
struct {
struct {
double a;
struct {
short b;
};
};
int c;
} d{.a = 7, .a = 8.09}; // { dg-error "designator used multiple times in the same initializer list" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment