diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-06-09 18:40:39 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-06-09 18:40:39 -0400 |
commit | 79d0fa97b18799f2b500fea3b3427b14f14629fb (patch) | |
tree | ca78c6d5533cb969bf740fa4f809fe179bbb9dad /gcc/tree.c | |
parent | 3ab1999b990d2da268828f659e47d8a5fb19afa3 (diff) | |
download | gcc-79d0fa97b18799f2b500fea3b3427b14f14629fb.zip gcc-79d0fa97b18799f2b500fea3b3427b14f14629fb.tar.gz gcc-79d0fa97b18799f2b500fea3b3427b14f14629fb.tar.bz2 |
(change_main_variant): Remove unused function.
(build_array_type): Remove obsolete references to change_main_variant.
From-SVN: r14196
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -3309,34 +3309,6 @@ build_type_variant (type, constp, volatilep) return t; } -/* Give TYPE a new main variant: NEW_MAIN. - This is the right thing to do only when something else - about TYPE is modified in place. */ - -void -change_main_variant (type, new_main) - tree type, new_main; -{ - tree t; - tree omain = TYPE_MAIN_VARIANT (type); - - /* Remove TYPE from the TYPE_NEXT_VARIANT chain of its main variant. */ - if (TYPE_NEXT_VARIANT (omain) == type) - TYPE_NEXT_VARIANT (omain) = TYPE_NEXT_VARIANT (type); - else - for (t = TYPE_NEXT_VARIANT (omain); t && TYPE_NEXT_VARIANT (t); - t = TYPE_NEXT_VARIANT (t)) - if (TYPE_NEXT_VARIANT (t) == type) - { - TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (type); - break; - } - - TYPE_MAIN_VARIANT (type) = new_main; - TYPE_NEXT_VARIANT (type) = TYPE_NEXT_VARIANT (new_main); - TYPE_NEXT_VARIANT (new_main) = type; -} - /* Create a new variant of TYPE, equivalent but distinct. This is so the caller can modify it. */ @@ -3959,15 +3931,6 @@ build_array_type (elt_type, index_type) hashcode = TYPE_HASH (elt_type) + TYPE_HASH (index_type); t = type_hash_canon (hashcode, t); -#if 0 /* This led to crashes, because it could put a temporary node - on the TYPE_NEXT_VARIANT chain of a permanent one. */ - /* The main variant of an array type should always - be an array whose element type is the main variant. */ - if (elt_type != TYPE_MAIN_VARIANT (elt_type)) - change_main_variant (t, build_array_type (TYPE_MAIN_VARIANT (elt_type), - index_type)); -#endif - if (TYPE_SIZE (t) == 0) layout_type (t); return t; |