This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/18315] missing error for incompatible array assignment involving lbound
- From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2006 15:54:56 -0000
- Subject: [Bug fortran/18315] missing error for incompatible array assignment involving lbound
- References: <bug-18315-9515@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from paul dot richard dot thomas at cea dot fr 2006-05-11 15:54 -------
> I think what is happening is that lbound's type is becoming a scalar and not > an array with size of 1.
I believe that I fixed this with either the bounds scalarization patch or some
of the work on conformance or both. Will close tonight.
Paul
Note the following:
THOMASP@PC-THOMAS-P /cygdrive/d/svn/prs
$ cat pr18315.f90;rm a.exe;/irun/bin/gfortran pr18315.f90;./a
program main
implicit none
real :: a(0:9)
integer :: bn(10)
bn(1:1) = lbound(a)
print *, bn(1)
end program main
0
THOMASP@PC-THOMAS-P /cygdrive/d/svn/prs
$ cat pr18315.f90;rm a.exe;/irun/bin/gfortran pr18315.f90;./a
program main
implicit none
real :: a(0:9)
integer :: bn(10)
bn = lbound(a)
print *, bn(1)
end program main
In file pr18315.f90:5
bn = lbound(a)
1
Error: different shape for Array assignment at (1) on dimension 1 (10/1)
bash: ./a: No such file or directory
THOMASP@PC-THOMAS-P /cygdrive/d/svn/prs
$ cat pr18315.f90;rm a.exe;/irun/bin/gfortran pr18315.f90;./a
program main
implicit none
real :: a(0:9)
integer :: bn(10)
bn(1) = lbound(a)
print *, bn(1)
end program main
rm: cannot remove `a.exe': No such file or directory
In file pr18315.f90:5
bn(1) = lbound(a)
1
Error: Incompatible ranks 0 and 1 in assignment at (1)
bash: ./a: No such file or directory
--
paul dot richard dot thomas at cea dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paul dot richard dot thomas
| |at cea dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18315