This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/18315] missing error for incompatible array assignment involving lbound



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]