public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18315] missing error for incompatible array assignment involving lbound
       [not found] <bug-18315-9515@http.gcc.gnu.org/bugzilla/>
@ 2006-01-08  5:53 ` pinskia at gcc dot gnu dot org
  2006-05-11 15:55 ` paul dot richard dot thomas at cea dot fr
  2006-05-13  4:25 ` pault at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-08  5:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-01-08 05:53 -------
Lahey's says:
  2317-S: "SOURCE.F90", line 5, column 3: Shape of arrays on left and right
sides of assignment do not conform.


I think what is happening is that lbound's type is becoming a scalar and not an
array with size of 1.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18315



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/18315] missing error for incompatible array assignment involving lbound
       [not found] <bug-18315-9515@http.gcc.gnu.org/bugzilla/>
  2006-01-08  5:53 ` [Bug fortran/18315] missing error for incompatible array assignment involving lbound pinskia at gcc dot gnu dot org
@ 2006-05-11 15:55 ` paul dot richard dot thomas at cea dot fr
  2006-05-13  4:25 ` pault at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-05-11 15:55 UTC (permalink / raw)
  To: gcc-bugs



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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/18315] missing error for incompatible array assignment involving lbound
       [not found] <bug-18315-9515@http.gcc.gnu.org/bugzilla/>
  2006-01-08  5:53 ` [Bug fortran/18315] missing error for incompatible array assignment involving lbound pinskia at gcc dot gnu dot org
  2006-05-11 15:55 ` paul dot richard dot thomas at cea dot fr
@ 2006-05-13  4:25 ` pault at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-05-13  4:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2006-05-13 04:25 -------
Fixed on trunk and 4.1 - see #5

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18315


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/18315] missing error for incompatible array assignment involving lbound
  2004-11-06 12:43 [Bug fortran/18315] New: wrong result for lbound with single argument Thomas dot Koenig at online dot de
@ 2005-09-13  8:34 ` rsandifo at gcc dot gnu dot org
  0 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-09-13  8:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-09-13 08:34 -------
After the patch for 18899, this now works for:

program main
  implicit none
  real :: a(0:9)
  integer :: bn(10)
  bn(1:1) = lbound(a)
  print *, bn(1)
end program main

but like FX says, we probably ought to report an error
for the mismatch in the original testcase.  Reclassifying
as a missing diagnostic bug.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
           Keywords|wrong-code                  |accepts-invalid
   Last reconfirmed|2005-05-08 17:28:58         |2005-09-13 08:34:24
               date|                            |
            Summary|wrong result for lbound with|missing error for
                   |single argument             |incompatible array
                   |                            |assignment involving lbound


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18315


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-13  4:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-18315-9515@http.gcc.gnu.org/bugzilla/>
2006-01-08  5:53 ` [Bug fortran/18315] missing error for incompatible array assignment involving lbound pinskia at gcc dot gnu dot org
2006-05-11 15:55 ` paul dot richard dot thomas at cea dot fr
2006-05-13  4:25 ` pault at gcc dot gnu dot org
2004-11-06 12:43 [Bug fortran/18315] New: wrong result for lbound with single argument Thomas dot Koenig at online dot de
2005-09-13  8:34 ` [Bug fortran/18315] missing error for incompatible array assignment involving lbound rsandifo at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).