This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa PATCH] Fix PR 12187
On Tue, 16 Sep 2003 15:24:05 -0700, Richard Henderson <rth@redhat.com> wrote:
> On Tue, Sep 16, 2003 at 11:50:06AM +0200, Steven Bosscher wrote:
>> since we now mark "a" as "may alias global memory" (in reality it may
>> not, of course). This will eliminate lots of optimization opportunities
>> for gfortran, since in Fortran nested functions are used quite often.
>
> I wouldn't have expected that fortran nested functions often
> wrote to the parent's variables. I would expect that would
> make things slightly easier.
If they don't, they should set DECL_NO_STATIC_CHAIN. Hmm, perhaps that
should be set automatically in the tree back end.
> Anyway, I would expect Fortran's nested functions to be inlined
> most of the time anyway, at which point the variable *isn't*
> used from a nested context, and the problem goes away.
In the testcase posted it didn't go away. Which is odd, since inlining
should have happened before any of these calculations.
Jason