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]

Re: [PATCH] Allow (again) const variables with zero (or no) initializers in .bss* named sections (PR middle-end/84237)


On 02/06/2018 01:44 PM, Jakub Jelinek wrote:
> Hi!
> 
> The last year's bss_initializer_p change apparently broke xen.  While it is
> reasonable not to put const variables into .bss* sections by default,
> refusing to put them when the user asks for it through using section
> attribute seems unnecessary.  If users screws up, he can get section flag
> conflicts diagnosed, if not, such as in this case when there is a separate
> .bss.page_aligned.const section, it should work as before.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR middle-end/84237
> 	* output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
> 	* varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
> 	TREE_READONLY bit.
> 	(get_variable_section): For decls in named .bss* sections pass true as
> 	second argument to bss_initializer_p.
> 
> 	* gcc.dg/pr84237.c: New test.
OK.
jeff


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