diff options
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); |