summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90
blob: 8bcdbb87a4fa232993e5a026d300b6bf00c0bf48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! PR fortran/16336 -- the two common blocks used to clash
MODULE bar
INTEGER :: I
COMMON /X/I
contains 
subroutine set_i()
i = 5
end subroutine set_i
END MODULE bar

USE bar
INTEGER :: J
COMMON /X/J
j = 1
i = 2
if (j.ne.i) call abort()
if (j.ne.2) call abort()
call set_i()
if (j.ne.5) call abort()
END