aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f9022
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f90
new file mode 100644
index 000000000..8f556f4b9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR fortran/52059
+!
+!
+
+subroutine baz
+ real(kind=8) :: a(99), b
+ interface bar
+ function bar (x, y)
+ integer, intent(in) :: x, y
+ real(kind=8), dimension((y-x)) :: bar
+ end function bar
+ end interface
+ b = 1.0_8
+ a = foo (bar(0,35) / dble(34), b)
+contains
+ elemental real(kind=8) function foo(x, y)
+ real(kind=8), intent(in) :: x, y
+ foo = 1
+ end function foo
+end subroutine baz