Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/allocatable_dummy_2.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 ! { dg-do compile } | |
2 ! Check a few constraints for ALLOCATABLE dummy arguments. | |
3 program alloc_dummy | |
4 | |
5 implicit none | |
6 integer :: a(5) | |
7 | |
8 call init(a) ! { dg-error "must be ALLOCATABLE" } | |
9 | |
10 contains | |
11 | |
12 subroutine init(x) | |
13 integer, allocatable, intent(out) :: x(:) | |
14 end subroutine init | |
15 | |
16 subroutine init2(x) | |
17 integer, allocatable, intent(in) :: x(:) | |
18 | |
19 allocate(x(3)) ! { dg-error "variable definition context" } | |
20 end subroutine init2 | |
21 | |
22 subroutine kill(x) | |
23 integer, allocatable, intent(in) :: x(:) | |
24 | |
25 deallocate(x) ! { dg-error "variable definition context" } | |
26 end subroutine kill | |
27 | |
28 end program alloc_dummy |