Dear Tobias, This is OK for trunk - thanks for the patch.
Cheers Paul On Tue, Apr 3, 2012 at 11:18 PM, Tobias Burnus <bur...@net-b.de> wrote: > Dear all, > > the attached patch only sets TREE_PUBLIC for module variables and module > procedures which have neither the PRIVATE attribute nor a C-binding label. > Seemingly, only NAG f95 does this for module variables and none of my > compilers does this for module procedures. > > The main effect of this patch is a code size reduction as the compiler might > (even without -fwhole-program -flto) optimize unused variables/procedures > away. Additionally, the compiler might inline code which it otherwise > wouldn't do (due to the code size increase) or do optimizations based on the > value of the module variables (though, GCC has room for improvement for > optimizing static variables.) > > Note: For C-binding variables without binding label ("bind(C, name='')"), I > don't use DECL_COMMON. That should be okay as DECL_COMMON is only used to > make sure that a variable can be initialized from either C or Fortran. But > without binding name, that's not possible from C, hence, that's fine. > > Build and regtested on x86-64-linux. (And currently regtesting again - after > a minor modification.) > OK for the trunk? > > Tobias > -- The knack of flying is learning how to throw yourself at the ground and miss. --Hitchhikers Guide to the Galaxy