Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/use_allocated_1.f90 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
111 | 1 ! { dg-do run } |
2 ! PR17678 | |
3 ! We were incorrectly setting use-associated variables to unallocated | |
4 ! on procedure entry. | |
5 module foo | |
6 integer, dimension(:), allocatable :: bar | |
7 end module | |
8 | |
9 program main | |
10 use foo | |
11 allocate (bar(10)) | |
12 call init | |
13 end program main | |
14 | |
15 subroutine init | |
16 use foo | |
131 | 17 if (.not.allocated(bar)) STOP 1 |
111 | 18 end subroutine init |