All,
The attached patch contains two testcases from Gerhard
from 2016-08-30, which I have added the dejagnu magic.
The last comment in the PR is from Andrew Pinski in
2021-12-17 that notes the PR was fixed in the 9.3, 10+
timeframe. The testcases are small. I suggest committing
the tests to ensure things are not broken in the future and
closing the PR.
2026-01-11 Steven G. Kargl <[email protected]>
PR fortran/77415
* pr77415_1.f90: New test.
* pr77415_2.f90: Ditto.
--
Steve
diff --git a/gcc/testsuite/gfortran.dg/pr77415_1.f90 b/gcc/testsuite/gfortran.dg/pr77415_1.f90
new file mode 100644
index 00000000000..00488009044
--- /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 00000000000..858c8223b84
--- /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
+