]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Test cases from previously fixed bug
authorSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 12 Jan 2026 02:58:19 +0000 (18:58 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 12 Jan 2026 03:10:39 +0000 (19:10 -0800)
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.

gcc/testsuite/gfortran.dg/pr77415_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr77415_2.f90 [new file with mode: 0644]

diff --git a/gcc/testsuite/gfortran.dg/pr77415_1.f90 b/gcc/testsuite/gfortran.dg/pr77415_1.f90
new file mode 100644 (file)
index 0000000..0048800
--- /dev/null
@@ -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 (file)
index 0000000..858c822
--- /dev/null
@@ -0,0 +1,8 @@
+! { dg-do compile }
+function f()
+   f(g) = 0       ! { dg-error "Statement function" }
+contains
+   function g()
+   end
+end
+