[RFH] Uses of output.h in the front ends

Eric Botcazou ebotcazou@adacore.com
Tue Jun 5 11:10:00 GMT 2012


> Part of the problem why it isn't put there by gcc 4.7 because the
> initializer is not a bss_initializer_p initializer. And this is
> because GNAT explicitly disables this in misc.c:
>
> /* Initialize options structure OPTS.  */
>
> static void
> gnat_init_options_struct (struct gcc_options *opts)
> {
>   /* Uninitialized really means uninitialized in Ada.  */
>   opts->x_flag_zero_initialized_in_bss = 0;
> }

Are you sure?  There should be no initializer, i.e. DECL_INITIAL == NULL_TREE.

The flag_zero_initialized_in_bss thing looks orthogonal to me.

> However, if the above code is removed (i.e.
> flag_zero_initialized_in_bss == 1, the default),
> categorize_decl_for_section returns SECCAT_BSS for BigArray, but the
> variable is still not put in .bss. This is because there is no special
> TARGET_ASM_SELECT_SECTION for Tru64, so default_select_section is
> called and it returns data_section.
>
> But at that point, bss_section==NULL anyway, because
> BSS_SECTION_ASM_OP is not defined for Tru64, even though ECOFF does
> support BSS sections.
>
> So I think that to fix this "properly" (and assumibng , support for
> .bss should be added to Tru64 by defining BSS_SECTION_ASM_OP, and
> implementing TARGET_ASM_SELECT_SECTION.

If the assembler does have a BSS_SECTION_ASM_OP, which isn't clear.  But we had 
a patch in our tree to work around this and which did something equivalent.
Attached.  We never submitted it because it introduced regressions in C++ IIRC.

> The same happens for rs6000-ibm-aix6.1, which also doesn't have
> BSS_SECTION_ASM_OP, even though there should be BSS support for XCOFF
> (http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.
>files%2Fdoc%2Faixfiles%2FXCOFF.htm).

That's certainly more annoying on AIX than on Tru64.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 1354 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20120605/24294801/attachment.bin>


More information about the Gcc mailing list