summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/nint_p7.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/nint_p7.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/nint_p7.f9012
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/nint_p7.f90 b/gcc/testsuite/gfortran.dg/nint_p7.f90
new file mode 100644
index 00000000000..8f3552293c5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/nint_p7.f90
@@ -0,0 +1,12 @@
+! Fortran
+! { dg-do compile { target { powerpc*-*-* } } }
+! { dg-require-effective-target powerpc_vsx_ok }
+! { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } }
+! { dg-options "-O2 -mcpu=power7 -ffast-math" }
+! { dg-final { scan-assembler-times "xsrdpi" 2 } }
+
+ subroutine test_nint(x4,x8)
+ real(4) x4
+ real(8) x8
+ print *, nint(x4), idnint(x8)
+ end subroutine test_nint