aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-03-11 01:46:24 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-03-11 01:46:24 +0000
commit066c84df53d126335c412cd047c529007325ba9c (patch)
tree31c45f5289a72e8e73d2d482615481eacec1c16b /gcc/tree.c
parentd4829a16b14c2f88a1a9a182845298d8b4fac775 (diff)
downloadgcc-066c84df53d126335c412cd047c529007325ba9c.zip
gcc-066c84df53d126335c412cd047c529007325ba9c.tar.gz
gcc-066c84df53d126335c412cd047c529007325ba9c.tar.bz2
tree.c (build_common_tree_nodes_2): Don't copy va_list_type_node if it's a record type.
* tree.c (build_common_tree_nodes_2): Don't copy va_list_type_node if it's a record type. From-SVN: r40376
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index db286c8..ae7f005 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4828,7 +4828,16 @@ build_common_tree_nodes_2 (short_double)
{
tree t;
BUILD_VA_LIST_TYPE (t);
- va_list_type_node = build_type_copy (t);
+
+ /* Many back-ends define record types without seting TYPE_NAME.
+ If we copied the record type here, we'd keep the original
+ record type without a name. This breaks name mangling. So,
+ don't copy record types and let c_common_nodes_and_builtins()
+ declare the type to be __builtin_va_list. */
+ if (TREE_CODE (t) != RECORD_TYPE)
+ t = build_type_copy (t);
+
+ va_list_type_node = t;
}
V4SF_type_node = make_node (VECTOR_TYPE);