* tree.c (build_common_tree_nodes_2): Don't copy va_list_type_node
if it's a record type.
From-SVN: r40376
+Sat Mar 10 22:42:05 2001 Alexandre Oliva <aoliva@redhat.com>
+
+ * tree.c (build_common_tree_nodes_2): Don't copy va_list_type_node
+ if it's a record type.
+
Sat Mar 10 17:52:54 2001 Christopher Faylor <cgf@cygnus.com>
* config/i386/cygwin.h: Make ../w32api a system directory. Reorganize
{
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);