RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr50875.f90
blob0c71080f0b25fb955e9ad3a58c7f2bc78154d384
1 ! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
2 ! { dg-options "-O3 -mavx" }
4 ! PR fortran/50875.f90
6 module test
8 implicit none
10 integer, parameter :: dp=kind(1.d0)
12 integer :: P = 2
14 real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:)
15 complex(kind=dp), allocatable :: cmplx_array_A(:)
17 contains
19 subroutine routine_A
21 integer :: i
23 allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P))
25 real_array_A = 1
26 real_array_B = 1
28 do i = 1, p
29 cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp)
30 cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1))
31 end do
33 deallocate(cmplx_array_A,real_array_B,real_array_A)
35 end subroutine routine_A
37 end module test