summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/whole_file_21.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/whole_file_21.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_21.f9027
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/whole_file_21.f90 b/gcc/testsuite/gfortran.dg/whole_file_21.f90
new file mode 100644
index 000000000..2bd979dd4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/whole_file_21.f90
@@ -0,0 +1,27 @@
+! { dg-do link }
+! PR fortran/40011
+!
+! Contributed by Joost VandeVondele
+!
+!
+! Before no "one" function was generated with -fwhole-file.
+!
+!
+SUBROUTINE one ( )
+END SUBROUTINE one
+
+SUBROUTINE two ( )
+END SUBROUTINE two
+
+MODULE mod
+CONTAINS
+ SUBROUTINE three ( )
+ CALL two ( )
+ END SUBROUTINE three
+ SUBROUTINE four ( )
+ CALL one ( )
+ END SUBROUTINE four
+END MODULE mod
+END
+
+! { dg-final { cleanup-modules "m" } }