Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.fortran-torture/execute/contained2.f90 @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
111 | 1 ! Program to check resolution of symbols with the same name |
2 program contained2 | |
3 implicit none | |
4 integer var1 | |
5 | |
6 var1 = 42 | |
131 | 7 if (f1() .ne. 1) STOP 1 |
111 | 8 call f2() |
131 | 9 if (var1 .ne. 42) STOP 2 |
111 | 10 contains |
11 | |
12 function f1 () | |
13 implicit none | |
14 integer f1 | |
15 integer var1 | |
16 integer f2 | |
17 | |
18 var1 = 1 | |
19 f2 = var1 | |
20 f1 = f2 | |
21 end function | |
22 | |
23 subroutine f2() | |
24 implicit none | |
131 | 25 if (f1() .ne. 1) STOP 3 |
111 | 26 end subroutine |
27 | |
28 end program |