Please could you help, I am looking for pgi fortran compiler option(s) to track the following obvious bound bug :
program bug
dimension a(2,2)
write(,) a(:,0)
end
Please could you help, I am looking for pgi fortran compiler option(s) to track the following obvious bound bug :
program bug
dimension a(2,2)
write(,) a(:,0)
end
Hi Alessandrini,
Add “-Mbounds”.
% cat x.f90
program bug
dimension a(2,2)
write(*,*) a(:,0)
end
% pgf90 x.f90
% a.out
-1.999570 0.000000
% pgf90 x.f90 -Mbounds
% a.out
0: Subscript out of range for array a (x.f90: 3)
subscript=0, lower bound=1, upper bound=2, dimension=2