Richard Biener wrote:
> A target specific default might be a good idea if we decide to revert.
>
> Note I proposed this change a few times already, but the fear was always
> we'll break too much legacy code.
It will definitely break some code, but new warnings with -Werror might too...
> Note you have to make sure GFortran still works! So I think the patch should
> be changed to make the default behavior be frontend dependent or have a
> fortran/ adjustment that fixes things up for the fortran dialects that need
> it.
Fortran doesn't use flag_no_common, so COMMON globals are not affected.
There is one use in Ada which looks like an optimization for specific targets:
/* Ada doesn't feature Fortran-like COMMON variables so we shouldn't
try to fiddle with DECL_COMMON. However, on platforms that don't
support global BSS sections, uninitialized global variables would
go in DATA instead, thus increasing the size of the executable. */
if (!flag_no_common
&& TREE_CODE (var_decl) == VAR_DECL
&& TREE_PUBLIC (var_decl)
&& !have_global_bss_p ())
DECL_COMMON (var_decl) = 1;
I don't understand how this works - if there is no bss support in the linker,
wouldn't common variables would still end up in the data section?
Wilco