PR40011 -fwhole-file problems
Richard Guenther
richard.guenther@gmail.com
Thu Jun 4 09:50:00 GMT 2009
On Thu, Jun 4, 2009 at 11:03 AM, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Dear Richard,
>
> Thank you for your response to this - I am very pleased that you
> continue to take an interest in gfortran.
>
>> The inliner is perfectly capable of inlining functions with static
>> variables. Likely GFortran messes up the flags for the static
>> vars so they get copied during inlining (which is what you see above,
>> use -uid on the dump flag to see the DECL uids).
>
> How does one deal with this? By putting TREE_STATIC variables in
> global scope? I could not immediately discern from tree.def or tree.h
> the sense in which gfortran messes up the flags.
I don't know. Can you point me to a testcase where I can reproduce
the issue? Basically the middle-end calls auto_var_in_fn_p to
see if a declaration is "auto" or "static". Are your specific cases
maybe CONST_DECLs?
Richard.
> Cheers
>
> Paul
>
> --
> The knack of flying is learning how to throw yourself at the ground and miss.
> --Hitchhikers Guide to the Galaxy
>
More information about the Fortran
mailing list