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/60322] [OOP] Incorrect bounds on polymorphic dummy array


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60322

Antony Lewis <antony at cosmologist dot info> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |antony at cosmologist dot info

--- Comment #5 from Antony Lewis <antony at cosmologist dot info> ---
Here's another example (giving 0 and 1 for lbound)

program test
double precision x,y
 x=3
 y=4

 call W([x,y]) !this gives wrong result (4,4)
 call W([3.d0,4.d0]) !this works (3,4)
contains

     subroutine W(Ar)
     class(*), intent(in) :: Ar(:)

     print *, lbound(ar)
     select type (Ar)
    type is (double precision)
      print *,Ar(1:2) 
     end select

     end subroutine

end program


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