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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [coarray_24.f90] - Blame information for rev 715

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-fcoarray=single -Wall" }
3
!
4
! This program is perfectly valid; however, passing an (allocatable) coarray
5
! as actual argument to a non-coarray allocatable dummy is doubtful as
6
! reallocation is not allowed. Thus, an intent(out) dummy should be always
7
! wrong.
8
!
9
 
10
integer, allocatable :: myCaf(:)[:]
11
 
12
allocate(myCaf(1)[*])
13
 
14
call doubtful_valid(myCaf)  ! { dg-warning "to allocatable, noncoarray dummy" }
15
call invalid(myCaf)         ! { dg-error "to allocatable, noncoarray, INTENT.OUT. dummy" }
16
contains
17
  subroutine doubtful_valid(x)
18
    integer, allocatable :: x(:)
19
    ! Valid as x's allocation status is not touched.
20
    x(1) = 7
21
  end subroutine doubtful_valid
22
  subroutine invalid(y)
23
    integer, allocatable, intent(out) :: y(:)
24
    allocate (y(1))
25
  end subroutine invalid
26
end

powered by: WebSVN 2.1.0

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