aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-06-02 17:31:34 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-06-02 17:31:34 -0400
commitba5ce70d08120244aab6c7cb02570ac8b88983af (patch)
tree811bfeab9eedbbaf64aaa1f839ad4a6e3f564b87 /gcc/c-common.c
parent7bc7696cbab2dbedf79274f891493eaa5a26b23f (diff)
downloadgcc-ba5ce70d08120244aab6c7cb02570ac8b88983af.zip
gcc-ba5ce70d08120244aab6c7cb02570ac8b88983af.tar.gz
gcc-ba5ce70d08120244aab6c7cb02570ac8b88983af.tar.bz2
(c_build_type_variant): Don't change TYPE_MAIN_VARIANT of new type.
From-SVN: r7427
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 425f92e..d09bf41 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1972,14 +1972,16 @@ c_build_type_variant (type, constp, volatilep)
{
if (TREE_CODE (type) == ARRAY_TYPE)
{
- tree real_main_variant = TYPE_MAIN_VARIANT (type);
-
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;
pop_obstacks ();
+
+ /* If the old TYPE had variants, we lose them here. However,
+ since the new TYPE can be in the permanent obstack and the
+ old one may not be, preserving this chain would cause permanent
+ objects to point to non-permanent ones. */
}
return build_type_variant (type, constp, volatilep);
}