summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_class_2.f90
blob: 58dce1aa1fd39c9440fe003b8f34ff30f94e2f14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
! { dg-do compile }
! { dg-options "-fcoarray=lib" }
! Check that error message is presented as long as polymorphic coarrays are
! not implemented.

module maccscal
   type t
      real, allocatable :: a
   end type
contains
   subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" }
      class(t) :: x[*]
      allocate (x%a)
   end
end
module mptrscal
   type t
      real, pointer :: a
   end type
contains
   subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" }
      class(t) :: x[*]
      allocate (x%a)
   end
end
module mallarr
   type t
      real, allocatable :: a(:)
   end type
contains
   subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" }
      class(t) :: x[*]
      allocate (x%a(2))
   end
end
module mptrarr
   type t
      real, pointer :: a(:)
   end type
contains
   subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" }
      class(t) :: x[*]
      allocate (x%a(2))
   end
end