Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/pointer_assign_15.f90 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
line wrap: on
line source
! { dg-do run } ! PR fortran/94578 ! This used to give wrong results. Original test case by Jan-Willem ! Blokland. program main implicit none type foo integer :: x, y end type foo integer :: i integer, dimension (2,2) :: array2d integer, dimension(:), pointer :: array1d type(foo), dimension(2*2), target :: solution data array2d /1,2,3,4/ array1d => solution%x array1d = reshape (source=array2d, shape=shape(array1d)) if (any (array1d /= [1,2,3,4])) stop 1 end program main