diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-03-11 01:46:24 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2001-03-11 01:46:24 +0000 |
commit | 066c84df53d126335c412cd047c529007325ba9c (patch) | |
tree | 31c45f5289a72e8e73d2d482615481eacec1c16b /gcc/tree.c | |
parent | d4829a16b14c2f88a1a9a182845298d8b4fac775 (diff) | |
download | gcc-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.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); |