[Bug fortran/33954] New: gfortran: incorrect output for array of dynamic bounds
hailijuan at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 31 03:36:00 GMT 2007
the testcase is minimized as file d.f90:
--------------------------------
SUBROUTINE sub(a, n)
REAL a(2:, 3:)
DO i=2, n+1
DO j=3, n+2
a(j,i)= i+j
ENDDO
ENDDO
RETURN
END
PROGRAM test
INTERFACE
SUBROUTINE sub(a,n)
REAL a(2:,3:)
INTEGER n
END SUBROUTINE sub
END INTERFACE
REAL bigarray(4,4)
CALL sub(bigarray(1:4:2,4:1:-2),2)
PRINT *,bigarray
END PROGRAM test
--------------------------------
micro# /import/dr3/s10/gcc-4.2/bin/gfortran -O3 d.f90 -o d
micro# ./d
0.000000 0.000000 -2.5430994E+38 -2.4856564E+38 -2.4856564E+38
NaN 9.1908364E-41 NaN 1.4012985E-45 -2.4595213E+38
9.3875787E-41 -2.5448664E+38 -2.5448664E+38 5.2214013E-35 6.000000
0.000000
micro# uname -a
SunOS micro 5.10 Generic_118822-30 sun4u sparc SUNW,Sun-Blade-1000
micro# /import/dr3/s10/gcc-4.2/bin/gfortran -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /import/dr2/starlex/1/gcc-4.2-20070228/configure
--prefix=/import/dr3/s10/gcc-4.2 --enable-languages=c,c++,fortran
--enable-rpath --with-mpfr=/import/dr3/s10/gcc-4.2
--with-gmp=/import/dr3/s10/gcc-4.2
Thread model: posix
gcc version 4.2.0 20070228 (prerelease)
--
Summary: gfortran: incorrect output for array of dynamic bounds
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hailijuan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33954
More information about the Gcc-bugs
mailing list