(j3.2006) Adventures in sections of constant arrays
Mon Mar 6 17:16:04 EST 2017
A simpler explanation could be that the Cray compiler has inlining enabled by default and there were no resulting calls in the main program, other than to the formatted write library routine, and EXIT. The ?problem? subroutines don?t do anything. However, suppressing inlining still results in a working code.
Other than the original definition of the named constant hello, I don?t see any definitions of hello (either direct or via an associated dummy argument) in the program.
On Mar 6, 2017, at 3:03 PM, Steve Lionel <steve at stevelionel.com> wrote:
> Might it be that Cray (and maybe PGI) doesn't put constants in write-protected memory, thus allowing overwriting the constant? I know of many compilers (including Intel's for a while) that did this, and it was a classic issue further in the past.
> On Mon, Mar 6, 2017 at 3:53 PM, Bill Long <longb at cray.com> wrote:
> Next: Cray
> > module swap PrgEnv-intel PrgEnv-cray
> > ftn test.f90
> > ./a.out
> Hello, world!
> So, it is possible, although uncommon, to get this to work.
> J3 mailing list
> J3 at mailman.j3-fortran.org
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3