PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / abstract_type_4.f03
blobdd0b0abc0710f97bfe034a9d1b9526c888458670
1 ! { dg-do compile }
3 ! Abstract Types.
4 ! Check for module file IO.
6 MODULE m
7   IMPLICIT NONE
9   TYPE, ABSTRACT :: abst_t
10     INTEGER :: x
11   END TYPE abst_t
13   TYPE, EXTENDS(abst_t) :: concrete_t
14     INTEGER :: y
15   END TYPE concrete_t
17 END MODULE m
19 PROGRAM main
20   USE m
21   IMPLICIT NONE
23   TYPE(abst_t) :: abst ! { dg-error "is of the ABSTRACT type 'abst_t'" }
24   TYPE(concrete_t) :: conc
26   ! See if constructing the extending type works.
27   conc = concrete_t (1, 2)
28 END PROGRAM main