Commit 7518398d by Marek Polacek Committed by Marek Polacek

re PR c++/84537 (ICE in get_string, at spellcheck-tree.h)

	PR c++/84537
	* name-lookup.c (suggest_alternative_in_explicit_scope): Return false
	if name is error node.

	* g++.dg/parse/error60.C: New test.

From-SVN: r257988
parent bdb8ec2d
2018-02-26 Marek Polacek <polacek@redhat.com>
PR c++/84537
* name-lookup.c (suggest_alternative_in_explicit_scope): Return false
if name is error node.
2018-02-25 Jason Merrill <jason@redhat.com>
PR c++/84015 - ICE with class deduction and auto template parm.
......
......@@ -5541,6 +5541,10 @@ bool
suggest_alternative_in_explicit_scope (location_t location, tree name,
tree scope)
{
/* Something went very wrong; don't suggest anything. */
if (name == error_mark_node)
return false;
/* Resolve any namespace aliases. */
scope = ORIGINAL_NAMESPACE (scope);
......
2018-02-26 Marek Polacek <polacek@redhat.com>
PR c++/84537
* g++.dg/parse/error60.C: New test.
2018-02-26 Jakub Jelinek <jakub@redhat.com>
PR c++/84556
......
// PR c++/84537
// { dg-do compile }
namespace N
{
template<int> struct A {};
}
N::template A<> a; // { dg-error "" }
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