(c_build_type_variant): Allocate new type in same obstack as old one.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 7 Sep 1993 23:11:15 +0000 (19:11 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 7 Sep 1993 23:11:15 +0000 (19:11 -0400)
From-SVN: r5278

gcc/c-common.c

index e4129d5f7e060dc17b9ff5736b28ad5638e5468b..3bdc7140ad3fa39401f67b6ebfea618e1783898d 100644 (file)
@@ -1194,16 +1194,13 @@ c_build_type_variant (type, constp, volatilep)
   if (TREE_CODE (type) == ARRAY_TYPE)
     {
       tree real_main_variant = TYPE_MAIN_VARIANT (type);
-      int permanent = TREE_PERMANENT (type);
 
-      if (permanent)
-       push_obstacks (&permanent_obstack, &permanent_obstack);
+      push_obstacks (TYPE_OBSTACK (type), TYPE_OBSTACK (type));
       type = build_array_type (c_build_type_variant (TREE_TYPE (type),
                                                     constp, volatilep),
                               TYPE_DOMAIN (type));
       TYPE_MAIN_VARIANT (type) = real_main_variant;
-      if (permanent)
-       pop_obstacks ();
+      pop_obstacks ();
     }
   return build_type_variant (type, constp, volatilep);
 }