Commit d2889b14 by Jason Merrill Committed by Jason Merrill

re PR c++/67339 (Segfault when parsing a typename involving a template-alias)

	PR c++/67339
	* parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P
	rather than check for RECORD_TYPE.

From-SVN: r231912
parent d6dd2c8e
2015-12-22 Jason Merrill <jason@redhat.com>
PR c++/67339
* parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P
rather than check for RECORD_TYPE.
2015-12-22 Patrick Palka <ppalka@gcc.gnu.org>
* pt.c (make_pack_expansion): Make sure to initialize
......
......@@ -16880,7 +16880,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
{
/* Indicate whether this class was declared as a `class' or as a
`struct'. */
if (TREE_CODE (type) == RECORD_TYPE)
if (CLASS_TYPE_P (type))
CLASSTYPE_DECLARED_CLASS (type) = (tag_type == class_type);
cp_parser_check_class_key (tag_type, type);
}
// PR c++/67339
// { dg-do compile { target c++11 } }
template < typename T>
struct A
{
void foo();
template < typename S, typename W >
using N = void (T::*)(S, W) const ;
};
template < typename T>
void A<T>::foo()
{
typename A<T>::template N<int, int> fun = &T::out;
}
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