This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Empty static constructor folding
On Mon, Sep 13, 2010 at 01:04:45PM -0700, Andrew Pinski wrote:
> On Mon, Sep 13, 2010 at 12:55 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > It seems that those testcases just need some obstructation to avoid folding. ?I wonder how I make varianble public in fortran?
>
> The easy way is to put the variables in a module and then do a "use
> module". Right now the variables in the program are really local to
> the function (either auto or static depending on the size of the array
> in this case they are huge so they are static).
Or you can add
common // a, b, c
or
call fill (a, b)
with
subroutine fill(a, b)
integer, parameter :: kp = 4
integer, parameter :: n = 2000
complex(kp), dimension(n,n) :: a,b
a = 1
b = 1
end subroutine fill
or something similar.
Jakub