------- Comment #8 from hailijuan at gmail dot com 2007-10-31 07:18 ------- Subject: Re: gfortran: incorrect output for array of dynamic bounds
running a.out compiled with -fbounds-check and then get following message: micro# ./a.out Fortran runtime error: Array reference out of bounds for array 'a', lower bound of dimension 2 exceeded (in file 'd.f90', at line 6) I have to say the testcase has been really confusing me. Anyway, thanks for your good explanation. Appreciate it. 31 Oct 2007 06:50:39 -0000, kargl at gcc dot gnu dot org <[EMAIL PROTECTED]>: > > > ------- Comment #7 from kargl at gcc dot gnu dot org 2007-10-31 06:50 ------- > (In reply to comment #6) > > Subject: Re: gfortran: incorrect output for array of dynamic bounds > > > > not like that. it's right to use a(j,i) which has j as lower dimension. > > memory layout of array(0:2, 0:1) is like: > > a(0,0), a(1,0), a(2,0), a(0,1), a(1,1), a(2,1) > > You're not even close to the want the code is doing. > > > the testcase is invalid for gfortran. I would close the bug report. > > > > The testcase is invalid for ALL Fortran compilers. How many times > does one need to tell you that the code is invalid Fortran. Period. > > Again, add -fbounds-check to the compiler options and see what happens. > Try your code with other compilers and their strictest conformance and > debugging options. > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33954 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33954