Commit cc059bdd by Jason Merrill Committed by Jason Merrill

re PR c++/57404 ([C++11] ICE: SIGSEGV in cp_classify_record with -g)

	PR c++/57404
	* cp-lang.c (cp_classify_record): Handle structs without
	TYPE_LANG_SPECIFIC.

From-SVN: r199456
parent 3a6a88c8
2013-05-30 Jason Merrill <jason@redhat.com>
PR c++/57404
* cp-lang.c (cp_classify_record): Handle structs without
TYPE_LANG_SPECIFIC.
PR c++/52377
* class.c (common_enclosing_class): New.
* cp-tree.h: Declare it.
......
......@@ -127,7 +127,8 @@ cxx_dwarf_name (tree t, int verbosity)
static enum classify_record
cp_classify_record (tree type)
{
if (CLASSTYPE_DECLARED_CLASS (type))
if (TYPE_LANG_SPECIFIC (type)
&& CLASSTYPE_DECLARED_CLASS (type))
return RECORD_IS_CLASS;
return RECORD_IS_STRUCT;
......
// PR c++/57404
// { dg-options "-std=c++11 -g" }
void f (int i)
{
int a[i];
[&a] {};
}
void g (int i)
{
int a[i];
[&a] {} ();
}
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