This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60322] [OOP] Incorrect bounds on polymorphic dummy array
- From: "antony at cosmologist dot info" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Jan 2015 16:53:40 +0000
- Subject: [Bug fortran/60322] [OOP] Incorrect bounds on polymorphic dummy array
- Auto-submitted: auto-generated
- References: <bug-60322-4 at http dot gcc dot gnu dot org/bugzilla/>
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