summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr40587.f
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr40587.f')
-rw-r--r--gcc/testsuite/gfortran.dg/pr40587.f17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr40587.f b/gcc/testsuite/gfortran.dg/pr40587.f
new file mode 100644
index 00000000000..0761d9d7e90
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr40587.f
@@ -0,0 +1,17 @@
+C PR traget/40587
+C { dg-do compile }
+C { dg-options "-O2" }
+ subroutine TEST(i, r, result)
+ implicit none
+ integer i
+ REAL*8 r
+ REAL*8 result
+ REAL*8 r2
+ if(i.eq.0) then
+ r2 = r
+ else
+ call ERROR()
+ endif
+ result = r2
+ return
+ end