This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH for mangle11.C

This patch fixes:

g++.dg/abi/mangle11.C  (test for warnings, line 10)
g++.dg/abi/mangle11.C (test for excess errors)
g++.dg/abi/mangle12.C  (test for warnings, line 11)
g++.dg/abi/mangle12.C (test for excess errors)
g++.dg/abi/mangle17.C  (test for warnings, line 11)
g++.dg/abi/mangle17.C  (test for warnings, line 8)
g++.dg/abi/mangle17.C (test for excess errors)
g++.dg/abi/mangle20-2.C  (test for warnings, line 13)
g++.dg/abi/mangle20-2.C (test for excess errors)

on i686-apple-darwin9.


	* decl2.c (maybe_make_one_only): Be sure to always
	call cxx_comdat_group, as it can produce abi warnings
	for the symbol.

Doing diffs in cp:
--- cp/decl2.c.~1~	2010-02-15 17:16:36.000000000 -0800
+++ cp/decl2.c	2010-02-16 12:33:33.000000000 -0800
@@ -1622,6 +1622,10 @@ maybe_make_one_only (tree decl)
   if (! flag_weak)

+ /* Do this first, as this can produce abi warnings, and we want to
+ ensure the context of those warnings doesn't change. */
+ tree name = cxx_comdat_group (decl);
/* We can't set DECL_COMDAT on functions, or cp_finish_file will think
we can get away with not emitting them if they aren't used. We need
to for variables so that cp_finish_decl will update their linkage,
@@ -1631,7 +1635,7 @@ maybe_make_one_only (tree decl)
- make_decl_one_only (decl, cxx_comdat_group (decl));
+ make_decl_one_only (decl, name);

       if (TREE_CODE (decl) == VAR_DECL)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]