Blame SOURCES/gcc44-pr56403.patch

f28b6a
2013-02-24  Jakub Jelinek  <jakub@redhat.com>
f28b6a
f28b6a
	PR c++/56403
f28b6a
	* init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
f28b6a
	of CLASS_TYPE_P.
f28b6a
f28b6a
	* g++.dg/torture/pr56403.C: New test.
f28b6a
f28b6a
--- gcc/cp/init.c	(revision 196259)
f28b6a
+++ gcc/cp/init.c	(revision 196260)
f28b6a
@@ -183,7 +183,7 @@ build_zero_init_1 (tree type, tree nelts
f28b6a
     ;
f28b6a
   else if (SCALAR_TYPE_P (type))
f28b6a
     init = convert (type, integer_zero_node);
f28b6a
-  else if (CLASS_TYPE_P (type))
f28b6a
+  else if (RECORD_OR_UNION_CODE_P (TREE_CODE (type)))
f28b6a
     {
f28b6a
       tree field;
f28b6a
       VEC(constructor_elt,gc) *v = NULL;
f28b6a
--- gcc/testsuite/g++.dg/torture/pr56403.C	(revision 0)
f28b6a
+++ gcc/testsuite/g++.dg/torture/pr56403.C	(revision 196260)
f28b6a
@@ -0,0 +1,12 @@
f28b6a
+// PR c++/56403
f28b6a
+// { dg-do compile }
f28b6a
+
f28b6a
+#include <stdarg.h>
f28b6a
+
f28b6a
+struct S { va_list err_args; };
f28b6a
+
f28b6a
+void *
f28b6a
+foo ()
f28b6a
+{
f28b6a
+  return new S ();
f28b6a
+}