2017-10-21 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pdt_8.f03
blobaeec407fb4bea637992d7342011a91faaecd004f
1 ! { dg-do compile }
3 ! Fixes of "accepts invalid".
4 ! Note that the undeclared parameter 'y' in 't1' was originally in the
5 ! type 't'. It turned out to be convenient to defer the error until the
6 ! type is used in the declaration of 'z'.
8 ! Contributed by Janus Weil  <janus@gcc.gnu.org>
10 implicit none
11 type :: t(i,a,x)         ! { dg-error "does not|has neither" }
12   integer, kind :: k     ! { dg-error "does not not appear in the type parameter list" }
13   integer :: i           ! { dg-error "has neither the KIND nor LEN attribute" }
14   integer, kind :: a(3)  ! { dg-error "must be a scalar" }
15   real, kind :: x        ! { dg-error "must be INTEGER" }
16 end type
18 type :: t1(k,y)          ! { dg-error "does not have a component" }
19   integer, kind :: k
20 end type
22 ! This is a knock-on from the previous error
23 type(t1(4,4)) :: z       ! { dg-error "Invalid character in name" }
24 end