aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/coarray_26.f90
blob: 06ff4cf79f724214e503ba25f954b6956e1ef08e (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
46
47
48
49
50
51
52
53
! { dg-do compile }
! { dg-options "-fcoarray=single" }
!
! Coarray declaration constraint checks
!

function foo3a() result(res)
  implicit none
  integer :: res
  codimension :: res[*] ! { dg-error "CODIMENSION attribute conflicts with RESULT" }
end

function foo2a() result(res)
  integer :: res[*] ! { dg-error "CODIMENSION attribute conflicts with RESULT" }
end

function fooa() result(res) ! { dg-error "shall not be a coarray or have a coarray component" }
  implicit none
  type t
    integer, allocatable :: A[:]
  end type t
  type(t):: res
end

function foo3() ! { dg-error "shall not be a coarray or have a coarray component" }
  implicit none
  integer :: foo3
  codimension :: foo3[*]
end

function foo2() ! { dg-error "shall not be a coarray or have a coarray component" }
  implicit none
  integer :: foo2[*]
end

function foo() ! { dg-error "shall not be a coarray or have a coarray component" }
  type t
    integer, allocatable :: A[:]
  end type t
  type(t):: foo
end

subroutine test()
  use iso_c_binding
  implicit none
  type(c_ptr), save :: caf[*] ! { dg-error "shall not be a coarray" }
end subroutine test

subroutine test2()
  use iso_c_binding
  implicit none
  type(c_funptr), save :: caf[*] ! { dg-error "shall not be a coarray" }
end subroutine test2