https://gcc.gnu.org/g:d1b8ebd8cb67ae57187f92dc7f78fa77f1fada98

commit r16-6699-gd1b8ebd8cb67ae57187f92dc7f78fa77f1fada98
Author: Steven G. Kargl <[email protected]>
Date:   Sun Jan 11 18:58:19 2026 -0800

    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:
---
 gcc/testsuite/gfortran.dg/pr77415_1.f90 | 6 ++++++
 gcc/testsuite/gfortran.dg/pr77415_2.f90 | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/gcc/testsuite/gfortran.dg/pr77415_1.f90 
b/gcc/testsuite/gfortran.dg/pr77415_1.f90
new file mode 100644
index 000000000000..004880090442
--- /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 000000000000..858c8223b847
--- /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
+

Reply via email to