* gfortran.dg/nint_p7.f90: New testcase.
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 25 Nov 2015 19:39:19 +0000 (19:39 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 25 Nov 2015 19:39:19 +0000 (14:39 -0500)
From-SVN: r230898

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/nint_p7.f90 [new file with mode: 0644]

index e0b16f592e79a7efa2f3c03df31b40f5eee093af..90c0aae9feec879ca497edbbb9770524cee024ac 100644 (file)
@@ -1,3 +1,7 @@
+2015-11-25  David Edelsohn  <dje.gcc@gmail.com>
+
+       * gfortran.dg/nint_p7.f90: New testcase.
+
 2015-11-25  Markus Trippelsdorf  <markus@trippelsdorf.de>
            Paolo Carlini  <paolo.carlini@oracle.com>
 
diff --git a/gcc/testsuite/gfortran.dg/nint_p7.f90 b/gcc/testsuite/gfortran.dg/nint_p7.f90
new file mode 100644 (file)
index 0000000..8f35522
--- /dev/null
@@ -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