diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-02-19 15:22:28 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-02-19 07:22:28 -0800 |
commit | 68017cb410dc476560ef648be47189825fef365a (patch) | |
tree | 8c6c796708593865d482060ea12cf6acb211e49f /gcc/cp/decl.c | |
parent | ab4194daa89047e2eacb66ef8d5d702418905bb0 (diff) | |
download | gcc-68017cb410dc476560ef648be47189825fef365a.zip gcc-68017cb410dc476560ef648be47189825fef365a.tar.gz gcc-68017cb410dc476560ef648be47189825fef365a.tar.bz2 |
re PR c++/39188 (G++ doesn't handle static anonymous union right)
gcc/
2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39188
* varasm.c (assemble_variable): Don't check DECL_NAME when
globalizing a variable.
gcc/cp/
2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39188
* cp-tree.h (maybe_commonize_var): New.
* decl.c (maybe_commonize_var): Make it extern.
* decl2.c (finish_anon_union): Call maybe_commonize_var.
gcc/testsuite/
2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39188
* g++.dg/abi/pr39188-1a.C: New.
* g++.dg/abi/pr39188-1b.C: Likewise.
* g++.dg/abi/pr39188-1.h: Likewise.
* g++.dg/abi/pr39188-2a.C: Likewise.
* g++.dg/abi/pr39188-2b.C: Likewise.
* g++.dg/abi/pr39188-2.h: Likewise.
* g++.dg/abi/pr39188-3a.C: Likewise.
* g++.dg/abi/pr39188-3b.C: Likewise.
* g++.dg/abi/pr39188-3.h: Likewise.
From-SVN: r144297
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8476959..930f944 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -81,7 +81,6 @@ static tree lookup_and_check_tag (enum tag_types, tree, tag_scope, bool); static int walk_namespaces_r (tree, walk_namespaces_fn, void *); static void maybe_deduce_size_from_array_init (tree, tree); static void layout_var_decl (tree); -static void maybe_commonize_var (tree); static tree check_initializer (tree, tree, int, tree *); static void make_rtl_for_nonlocal_decl (tree, tree, const char *); static void save_function_data (tree); @@ -4536,7 +4535,7 @@ layout_var_decl (tree decl) we have a weak definition, we must endeavor to create only one instance of the variable at link-time. */ -static void +void maybe_commonize_var (tree decl) { /* Static data in a function with comdat linkage also has comdat |