coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr46519-1.f
blob46be9f590ddec7d865422ed8847bf6a2cf267930
1 ! { dg-do compile { target i?86-*-* x86_64-*-* } }
2 ! { dg-options "-O3 -mavx -mvzeroupper -fno-tree-slp-vectorize -mtune=generic -dp" }
4 PROGRAM MG3XDEMO
5 INTEGER LM, NM, NV, NR, NIT
8 PARAMETER( LM=7 )
9 C PARAMETER( NIT=40 )
10 PARAMETER( NM=2+2**LM, NV=NM**3 )
11 PARAMETER( NR = (8*(NM**3+NM**2+5*NM-23+7*LM))/7 )
14 C If commented line is used than there is no penalty
15 C COMMON /X/ U, V, R, A, C, IR, MM
16 COMMON /X/ A, C, IR, MM
17 REAL*8 A(0:3),C(0:3)
19 INTEGER IT, N
20 INTEGER LMI, MTIME, NTIMES
22 READ *,LMI
23 READ *,NIT
24 READ *,NTIMES
25 READ *,U0
27 READ 9004, A
28 READ 9004, C
29 9004 FORMAT (4D8.0)
31 DO I = 0, 3
32 A(I) = A(I)/3.0D0
33 C(I) = C(I)/64.0D0
34 ENDDO
36 N = 2 + 2**LMI
38 WRITE(6,7)N-2,N-2,N-2,NIT
39 6 FORMAT( I4, 2E19.12)
40 7 FORMAT(/,' KERNEL B: SOLVING A POISSON PROBLEM ON A ',I6,' BY ',
41 > I6,' BY ',I6,' GRID,',/,' USING ',I6,' MULTIGRID ITERATIONS.',/)
43 STOP
44 END
46 ! { dg-final { scan-assembler-times "avx_vzeroupper" 1 } }