This is the mail archive of the gcc-patches@gcc.gnu.org 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] !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);


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