arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / transfer_class_3.f90
blob90082d7ebf0cf71eb7f241f4f57416c12a20e709
1 ! { dg-do run }
3 ! Test the fix for PR66679.
5 ! Contributed by Miha Polajnar <polajnar.miha@gmail.com>
7 program main
8 implicit none
9 class(*), allocatable :: vec(:)
10 integer :: var, ans(2)
11 allocate(vec(2),source=[1_4, 2_4])
13 ! This worked correctly.
14 if (any (transfer(vec,[var],2) .ne. [1_4, 2_4])) stop 1
16 ! This caused an ICE.
17 if (any ([transfer(vec(1),[var]), transfer(vec(2),[var])] .ne. [1_4, 2_4])) stop 2
18 end program main