aarch64: Add vector floating point extend pattern [PR113880, PR113869]
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_source_27.f90
blobd0f0f3c4a843dccbfc4580e565183c6f35881439
2 ! { dg-do run }
4 ! fortran/PR114024
5 ! https://github.com/fujitsu/compiler-test-suite
6 ! Modified from Fortran/0093/0093_0130.f90
8 program foo
9 implicit none
10 complex :: cmp(3)
11 real, allocatable :: xx(:), yy(:), zz(:)
12 cmp = (3., 6.78)
13 allocate(xx, source = cmp%re) ! This caused an ICE.
14 allocate(yy, source = cmp(1:3)%re) ! This caused an ICE.
15 allocate(zz, source = (cmp%re))
16 if (any(xx /= [3., 3., 3.])) stop 1
17 if (any(yy /= [3., 3., 3.])) stop 2
18 if (any(zz /= [3., 3., 3.])) stop 3
19 end program foo