Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/realloc_on_assign_13.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 ! Test the fix for PR52386. | |
3 ! | |
4 ! Contributed by Juergen Reuter <reuter@physik.uni-freiburg.de> | |
5 ! | |
6 module cascades | |
7 implicit none | |
8 private | |
9 contains | |
10 function reduced (array) | |
11 integer, dimension(:), allocatable :: reduced | |
12 integer, dimension(:), intent(in) :: array | |
13 logical, dimension(size(array)) :: mask | |
14 mask = .true. | |
15 allocate (reduced (count (mask))) | |
16 reduced = pack (array, mask) | |
17 end function reduced | |
18 end module cascades |