]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran: Add testcase [PR84779]
authorChristopher Albert <albert@tugraz.at>
Tue, 10 Mar 2026 23:19:25 +0000 (00:19 +0100)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 20 Mar 2026 02:19:58 +0000 (19:19 -0700)
The reproducer from the bug report compiles cleanly on current
trunk.  Add a testcase to prevent future regressions.

PR fortran/84779

gcc/testsuite/ChangeLog:

PR fortran/84779
* gfortran.dg/pr84779.f90: New test.

Signed-off-by: Christopher Albert <albert@tugraz.at>
gcc/testsuite/gfortran.dg/pr84779.f90 [new file with mode: 0644]

diff --git a/gcc/testsuite/gfortran.dg/pr84779.f90 b/gcc/testsuite/gfortran.dg/pr84779.f90
new file mode 100644 (file)
index 0000000..dfddf41
--- /dev/null
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-additional-options "-O1 -fdefault-integer-8" }
+! PR fortran/84779
+! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
+!
+! ICE with -O1 -fdefault-integer-8 on mixed ENTRY with complex/logical results.
+
+      complex function f2 (a)
+      implicit none
+      integer   a
+      logical   e2
+      entry e2 (a)
+      if (a > 0) then
+        e2 = .true.
+      else
+        f2 = 45
+      endif
+      end