This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C] !PUBLIC COMMON var in c-decl.c
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, jsm at polyomino dot org dot uk, rth at redhat dot com
- Date: Thu, 12 Nov 2009 18:13:13 +0100
- Subject: [C] !PUBLIC COMMON var in c-decl.c
Hi,
my extra sanity check got this positive at build_compound_literal where we
build COMDAT function that is not PUBLIC. I think this is bug. This is
excersised by c99-complit-1.c
Should not the code call make_decl_one_only?
Honza
* c-decl.c (build_compound_literal): Make COMDAT public.
Index: c-decl.c
===================================================================
--- c-decl.c (revision 154120)
+++ c-decl.c (working copy)
@@ -4497,6 +4497,7 @@ build_compound_literal (location_t loc,
set_compound_literal_name (decl);
DECL_DEFER_OUTPUT (decl) = 1;
DECL_COMDAT (decl) = 1;
+ TREE_PUBLIC (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
pushdecl (decl);