diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/whole_file_19.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/whole_file_19.f90 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/whole_file_19.f90 b/gcc/testsuite/gfortran.dg/whole_file_19.f90 new file mode 100644 index 000000000..56f3cb69d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/whole_file_19.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! { dg-options "-fwhole-file" } +! Test the fix for pr40011 comment #42, in which the subroutine +! would just get lost with -fwhole-file. +! +! Contributed by Joost VandeVandole <jv244@cam.ac.uk> +! +SUBROUTINE c() + CALL a() +END SUBROUTINE c + +SUBROUTINE a() +END SUBROUTINE a + +MODULE M +CONTAINS + SUBROUTINE b() + CALL c() + END SUBROUTINE +END MODULE + +USE M +CALL b() +END +! { dg-final { cleanup-modules "m" } } |