OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [abstract_type_4.f03] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
 
3
! Abstract Types.
4
! Check for module file IO.
5
 
6
MODULE m
7
  IMPLICIT NONE
8
 
9
  TYPE, ABSTRACT :: abst_t
10
    INTEGER :: x
11
  END TYPE abst_t
12
 
13
  TYPE, EXTENDS(abst_t) :: concrete_t
14
    INTEGER :: y
15
  END TYPE concrete_t
16
 
17
END MODULE m
18
 
19
PROGRAM main
20
  USE m
21
  IMPLICIT NONE
22
 
23
  TYPE(abst_t) :: abst ! { dg-error "is of the ABSTRACT type 'abst_t'" }
24
  TYPE(concrete_t) :: conc
25
 
26
  ! See if constructing the extending type works.
27
  conc = concrete_t (1, 2)
28
END PROGRAM main
29
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.