This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cray pointer behavior in 4.6 (bug?)


Hello,

I have observed some behavior in gfortran 4.6 that does not occur in 4.5 and earlier (as far as I know). The issue is associated with the use of cray pointers.

The attached code is the simplest example I can make that reproduces the issue. When this is compiled with gfortran 4.6 following

% gfortran -fcray-pointer -O3 sample.F90

the output is

Values in print_vals : 0 0 0

When compiled with

% gfortran -fno-automatic -fcray-pointer -O3 sample.F90

or version 4.5 or earlier the output is

Values in print_vals : 900 800 700

Further, uncommenting line 8 and commenting out line 6 makes it work. Or alternatively, uncommenting line 35 makes it work.


I'm hoping someone can tell me what the issue is. Maybe I have some illegal statements or maybe it is a bug...


Any help would be appreciated.

Cheers,

Ryan Elliott

Attachment: sample.F90
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]