This is the mail archive of the gcc-patches@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]

Re: [Patch, fortran] PR82173 (PDT) - [meta-bug] Parameterized derived type errors


Dear Paul,

I have been playing with the patch and found that the following variant of the test for pr82168

module mod
implicit none

integer, parameter :: dp = kind (0.0d0)

type, public :: v(z, k)
   integer, len :: z
   integer, kind :: k = kind(0.0)
   real(kind = k) :: e(z)
end type v

end module mod

program bug
use mod
implicit none

type (v(2)) :: a
a%e = 1.0
type (v(z=:, k=dp)) :: b

end program bug

gives the error

pr82168_db_1.f90:23:24:

 type (v(z=:, k=dp)) :: b
                        1
Error: Unexpected data declaration statement at (1)

I am also puzzled by the meaning of ‘z=:’ in the main program. Should not it be restricted to be inside a procedure?

Cheers,

Dominique



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