Commit 69dad6fa by Paolo Carlini Committed by Paolo Carlini

re PR c++/90173 (ICE: Segmentation fault (in strip_declarator_types))

/cp
2019-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/90173
	* decl.c (grokdeclarator): Set type to error_mark_node
	upon error about template placeholder type non followed
	by a simple declarator-id.

/testsuite
2019-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/90173
	* g++.dg/cpp1z/class-deduction66.C: New.

From-SVN: r270603
parent 8281e3b8
2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
* decl.c (grokdeclarator): Set type to error_mark_node
upon error about template placeholder type non followed
by a simple declarator-id.
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
min_location.
......
......@@ -10973,6 +10973,7 @@ grokdeclarator (const cp_declarator *declarator,
error_at (typespec_loc, "template placeholder type %qT must be followed "
"by a simple declarator-id", type);
inform (DECL_SOURCE_LOCATION (tmpl), "%qD declared here", tmpl);
type = error_mark_node;
}
staticp = 0;
......
2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
* g++.dg/cpp1z/class-deduction66.C: New.
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/trailing1.C: New.
......
// PR c++/90173
// { dg-do run { target c++17 } }
template <typename T> struct A { };
A(int) -> A<int>;
namespace decl {
A (*fp)() = 0; // { dg-error "placeholder" }
}
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