This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR82173 (PDT) - [meta-bug] Parameterized derived type errors
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Sep 2017 14:47:22 +0200
- Subject: Re: [Patch, fortran] PR82173 (PDT) - [meta-bug] Parameterized derived type errors
- Authentication-results: sourceware.org; auth=none
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