summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr35662.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr35662.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr35662.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr35662.f90 b/gcc/testsuite/gfortran.dg/pr35662.f90
new file mode 100644
index 000000000..33095f002
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr35662.f90
@@ -0,0 +1,20 @@
+! PR target/35662
+! { dg-do run }
+! { dg-options "-O1" }
+
+subroutine f(x, y, z)
+ real, intent (in) :: x
+ real, intent (out) :: y, z
+ y = sin (x)
+ z = cos (x)
+end subroutine f
+
+program pr35662
+ real :: x, y, z
+ x = 3.1415926535897932384626433832795029
+ call f (x, y, z)
+ if (abs (y) > 1.0e-5 .or. abs (z + 1.0) > 1.0e-5) call abort
+ x = x / 2.0
+ call f (x, y, z)
+ if (abs (y - 1.0) > 1.0e-5 .or. abs (z) > 1.0e-5) call abort
+end program pr35662