* init.c (build_new): Propagate error_mark_node up.
authorMike Stump <mrs@wrs.com>
Fri, 13 Feb 1998 14:07:32 +0000 (14:07 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 13 Feb 1998 14:07:32 +0000 (09:07 -0500)
From-SVN: r17968

gcc/cp/ChangeLog
gcc/cp/init.c

index bdad01d..3dfba2e 100644 (file)
@@ -1,3 +1,7 @@
+Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
+
+       * init.c (build_new): Propagate error_mark_node up.
+
 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
        * parse.y (simple_stmt): If the condition isn't a declaration, 
index c3bb1a8..ced15d4 100644 (file)
@@ -2666,13 +2666,11 @@ build_new_1 (exp)
          newrval = build_method_call (newrval, ctor_identifier,
                                       init, TYPE_BINFO (true_type), flags);
 
-         if (newrval)
-           {
-             rval = newrval;
-             TREE_HAS_CONSTRUCTOR (rval) = 1;
-           }
-         else
-           rval = error_mark_node;
+         if (newrval == NULL_TREE || newrval == error_mark_node)
+           return error_mark_node;
+
+         rval = newrval;
+         TREE_HAS_CONSTRUCTOR (rval) = 1;
        }
       else
        rval = build (VEC_INIT_EXPR, TREE_TYPE (rval),