aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_48.f90
blob: adec014995f0c0b2ec41c0ce23bb7af1cfffbddd (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
! { dg-do compile }
! { dg-options "-fcoarray=lib" }
!
! Fix for P99818 in which wrong code caused an ICE.
!
! Contributed by Gerhard Steinmetz <gscfq@t-online.de>
!
module m
   type t
      integer :: a
   contains
      procedure :: s
   end type
contains
   subroutine s(x)
      class(t) :: x[*]
   end
end
program p
   use m
   associate (y => t(1))
      call y%s           ! { dg-error "must be a coarray" }
   end associate
end