[fortran] Set TREE_STATIC flag on static initializers

H.J. Lu hjl.tools@gmail.com
Wed Sep 8 16:45:00 GMT 2010


On Sat, Sep 4, 2010 at 4:18 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> fortran, unlike all other frontends, does not set TREE_STATIC flag on static
> initializers.  This prevents us from folding till the cfgexpand time.  To be honest,
> I am not quite sure why we insist on the flag (I guess we should assert that all statics
> are initializerd with static initializer or ignore it), but this patch brings gfortran
> into sync with others.
>
> Bootstrapped/regtested x86_64-linux, OK?
>
> Honza
>
>        * trans-expr.c (gfc_conv_initializer): Set TREE_STATIC on static ctors.

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45598


-- 
H.J.



More information about the Gcc-patches mailing list