Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/proc_ptr_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 ! | |
3 ! checking invalid code for PROCEDURE POINTERS | |
4 ! | |
5 ! Contributed by Janus Weil <janus@gcc.gnu.org> | |
6 | |
7 PROCEDURE(REAL), POINTER :: ptr | |
8 PROCEDURE(REAL), SAVE :: noptr ! { dg-error "attribute conflicts with" } | |
9 REAL :: x | |
10 | |
11 abstract interface | |
12 subroutine bar(a) | |
13 integer :: a | |
14 end subroutine bar | |
15 end interface | |
16 | |
17 ptr => cos(4.0) ! { dg-error "Invalid procedure pointer assignment" } | |
18 ptr => x ! { dg-error "Invalid procedure pointer assignment" } | |
19 ptr => sin(x) ! { dg-error "Invalid procedure pointer assignment" } | |
20 | |
21 ptr => bar ! { dg-error "is invalid in procedure pointer assignment" } | |
22 | |
23 ALLOCATE(ptr) ! { dg-error "must be ALLOCATABLE" } | |
24 | |
25 end |