Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/pointer_array_10.f90 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
! { dg-do run } ! ! Test the fix for PR87336, in which the 'span' field of the array ! descriptor, passed to 'show', was not set. ! ! Contributed by Juergen Reuter <juergen.reuter@desy.de> following ! a posting to clf by 'Spectrum'. ! program main implicit none integer, target :: a( 2:4 ) a = [2,3,4] ! print *, "a [before] = ", a call show( a ) ! print *, "a [after] = ", a if (any (a .ne. [200,300,400])) stop 1 contains subroutine show( arr ) integer, pointer, intent(in) :: arr(:) ! print *, "arr = ", arr ! print *, "bounds = ", lbound(arr), ubound(arr) arr(:) = [200,300,400] ! print *, "arr2= ", arr end subroutine show end program