blob: dd0b0abc0710f97bfe034a9d1b9526c888458670 [file] [log] [blame]
! { dg-do compile }
! Abstract Types.
! Check for module file IO.
MODULE m
IMPLICIT NONE
TYPE, ABSTRACT :: abst_t
INTEGER :: x
END TYPE abst_t
TYPE, EXTENDS(abst_t) :: concrete_t
INTEGER :: y
END TYPE concrete_t
END MODULE m
PROGRAM main
USE m
IMPLICIT NONE
TYPE(abst_t) :: abst ! { dg-error "is of the ABSTRACT type 'abst_t'" }
TYPE(concrete_t) :: conc
! See if constructing the extending type works.
conc = concrete_t (1, 2)
END PROGRAM main