Mercurial > hg > CbC > CbC_llvm
comparison flang/test/Semantics/resolve55.f90 @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 0572611fdcc8 |
children | 5f17cb93ff66 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 ! RUN: %S/test_errors.sh %s %t %f18 | 1 ! RUN: %S/test_errors.sh %s %t %flang_fc1 |
2 ! Tests for C1128: | 2 ! Tests for C1128: |
3 ! A variable-name that appears in a LOCAL or LOCAL_INIT locality-spec shall not | 3 ! A variable-name that appears in a LOCAL or LOCAL_INIT locality-spec shall not |
4 ! have the ALLOCATABLE; INTENT (IN); or OPTIONAL attribute; shall not be of | 4 ! have the ALLOCATABLE; INTENT (IN); or OPTIONAL attribute; shall not be of |
5 ! finalizable type; shall not be a nonpointer polymorphic dummy argument; and | 5 ! finalizable type; shall not be a nonpointer polymorphic dummy argument; and |
6 ! shall not be a coarray or an assumed-size array. | 6 ! shall not be a coarray or an assumed-size array. |
34 !ERROR: INTENT IN argument 'arg' not allowed in a locality-spec | 34 !ERROR: INTENT IN argument 'arg' not allowed in a locality-spec |
35 do concurrent(i=1:5) local(arg) | 35 do concurrent(i=1:5) local(arg) |
36 end do | 36 end do |
37 end subroutine s4 | 37 end subroutine s4 |
38 | 38 |
39 subroutine s5() | 39 module m |
40 ! Cannot have a variable of a finalizable type in a locality spec | 40 ! Cannot have a variable of a finalizable type in a locality spec |
41 type t1 | 41 type t1 |
42 integer :: i | 42 integer :: i |
43 contains | 43 contains |
44 final :: f | 44 final :: f |
45 end type t1 | 45 end type t1 |
46 | 46 contains |
47 type(t1) :: var | 47 subroutine s5() |
48 | 48 type(t1) :: var |
49 !ERROR: Finalizable variable 'var' not allowed in a locality-spec | 49 !ERROR: Finalizable variable 'var' not allowed in a locality-spec |
50 do concurrent(i=1:5) local(var) | 50 do concurrent(i=1:5) local(var) |
51 end do | 51 end do |
52 | 52 end subroutine s5 |
53 contains | |
54 subroutine f(x) | 53 subroutine f(x) |
55 type(t1) :: x | 54 type(t1) :: x |
56 end subroutine f | 55 end subroutine f |
57 end subroutine s5 | 56 end module m |
58 | 57 |
59 subroutine s6 | 58 subroutine s6 |
60 ! Cannot have a nonpointer polymorphic dummy argument in a locality spec | 59 ! Cannot have a nonpointer polymorphic dummy argument in a locality spec |
61 type :: t | 60 type :: t |
62 integer :: field | 61 integer :: field |