Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/intent_out_1.f90 @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 ! { dg-do compile } |
2 ! Tests the fix for PRs 18578, 18579 and their repeats 20857 and 20885. | |
3 ! Contributed by Paul Thomas <pault@gcc@gnu.org> | |
4 real, parameter :: a =42.0 | |
5 real :: b | |
6 call foo(b + 2.0) ! { dg-error "variable definition context" } | |
7 call foo(a) ! { dg-error "variable definition context" } | |
8 call bar(b + 2.0) ! { dg-error "variable definition context" } | |
9 call bar(a) ! { dg-error "variable definition context" } | |
10 contains | |
11 subroutine foo(a) | |
12 real, intent(out) :: a | |
13 a = 0.0 | |
14 end subroutine foo | |
15 subroutine bar(a) | |
16 real, intent(INout) :: a | |
17 a = 0.0 | |
18 end subroutine bar | |
19 end |