c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pdt_9.f03
blobafa1cddd163b1542bf0926414372aac4deae6374
1 ! { dg-do compile }
3 ! Test the fix for PR82168 in which the declarations for 'a'
4 ! and 'b' threw errors even though they are valid.
6 ! Contributed by  <physiker@toast2.net>
8 module mod
9   implicit none
10   integer, parameter :: dp = kind (0.0d0)
11   type, public :: v(z, k)
12     integer, len :: z
13     integer, kind :: k = kind(0.0)
14     real(kind = k) :: e(z)
15   end type v
16 end module mod
18 program bug
19   use mod
20   implicit none
21   type (v(2)) :: a     ! Missing parameter replaced by initializer.
22   type (v(z=:, k=dp)), allocatable :: b ! Keyword was not working for '*' or ':'
23 end program bug