Commit 5621a5d7 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/56403 (internal compiler error: in build_zero_init_1, at cp/init.c:279)

	PR c++/56403
	* init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
	of CLASS_TYPE_P.

	* g++.dg/torture/pr56403.C: New test.

From-SVN: r196260
parent 6d65e8f1
2013-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/56403
* init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
of CLASS_TYPE_P.
2013-02-22 Jason Merrill <jason@redhat.com>
PR c++/40405
......
......@@ -179,7 +179,7 @@ build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
init = convert (type, nullptr_node);
else if (SCALAR_TYPE_P (type))
init = convert (type, integer_zero_node);
else if (CLASS_TYPE_P (type))
else if (RECORD_OR_UNION_CODE_P (TREE_CODE (type)))
{
tree field;
vec<constructor_elt, va_gc> *v = NULL;
......
2013-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/56403
* g++.dg/torture/pr56403.C: New test.
2013-02-25 Catherine Moore <clm@codesourcery.com>
Revert:
......
// PR c++/56403
// { dg-do compile }
#include <stdarg.h>
struct S { va_list err_args; };
void *
foo ()
{
return new S ();
}
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