aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gfortran.dg/pr52370.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gfortran.dg/pr52370.f90')
-rw-r--r--gcc-4.8/gcc/testsuite/gfortran.dg/pr52370.f9021
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gfortran.dg/pr52370.f90 b/gcc-4.8/gcc/testsuite/gfortran.dg/pr52370.f90
new file mode 100644
index 000000000..66a6fe2b8
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gfortran.dg/pr52370.f90
@@ -0,0 +1,21 @@
+! PR fortran/52370
+! { dg-do compile }
+! { dg-options "-O1 -Wall" }
+
+module pr52370
+contains
+ subroutine foo(a,b)
+ real, intent(out) :: a
+ real, dimension(:), optional, intent(out) :: b
+ a=0.5
+ if (present(b)) then
+ b=1.0
+ end if
+ end subroutine foo
+end module pr52370
+
+program prg52370
+ use pr52370
+ real :: a
+ call foo(a)
+end program prg52370