Fortran: Test cases from previously fixed bug

Adding two testcases from Gerhard Steinmetz from 2016-08-30.
These have had the dejagnu directives added.  The last comment
in the PR is from Andrew Pinski notes the PR was fixed in the 9.3,
10+ timeframe.  The testcases are small.  Committing the tests to
ensure things are not broken in the future.

	PR fortran/77415

gcc/testsuite/ChangeLog:

	* gfortran.dg/pr77415_1.f90: New test.
	* gfortran.dg/pr77415_2.f90: New test.
diff --git a/gcc/testsuite/gfortran.dg/pr77415_1.f90 b/gcc/testsuite/gfortran.dg/pr77415_1.f90
new file mode 100644
index 0000000..0048800
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr77415_1.f90
@@ -0,0 +1,6 @@
+integer function f()
+   f(g) = 0       ! { dg-error "Statement function" }
+contains
+   integer function g()
+   end
+end
diff --git a/gcc/testsuite/gfortran.dg/pr77415_2.f90 b/gcc/testsuite/gfortran.dg/pr77415_2.f90
new file mode 100644
index 0000000..858c822
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr77415_2.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+function f()
+   f(g) = 0       ! { dg-error "Statement function" }
+contains
+   function g()
+   end
+end
+