This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25951] New: Problem with LOC intrinsic for assumed size arrays
- From: "mhesseli at caltech dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2006 23:11:29 -0000
- Subject: [Bug fortran/25951] New: Problem with LOC intrinsic for assumed size arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the following code results in a compile error:
PROGRAM loc_1
CONTAINS
SUBROUTINE f (x)
INTEGER, DIMENSION(*) :: x
INTEGER :: address
address=LOC(x)
END SUBROUTINE f
END PROGRAM loc_1
The error produced by gfortran is:
[aardschokker:fms/trunk/obj] mark% /usr/local/bin/gfortran -c loc_1.f90
In file loc_1.f90:6
address=LOC(x)
1
Error: The upper bound in the last dimension must appear in the reference to
the assumed size array 'x' at (1)
This code has been compiled with
[aardschokker:fms/trunk/obj] mark% /usr/local/bin/gfortran -v
Using built-in specs.
Target: powerpc-apple-darwin7.9.0
Configured with: /storage/usr/src/gcc/configure --prefix=/usr/local
--disable-libmudflap --enable-altivec --enable-languages=c,fortran
--with-gmp=/sw --with-mpfr=/sw
Thread model: posix
gcc version 4.2.0 20060121 (experimental)
--
Summary: Problem with LOC intrinsic for assumed size arrays
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mhesseli at caltech dot edu
GCC build triplet: powerpc-apple-darwin7.9.0
GCC host triplet: powerpc-apple-darwin7.9.0
GCC target triplet: powerpc-apple-darwin7.9.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25951