1! { dg-do compile } 2! Test the fix for pr40011 comment #42, in which the subroutine 3! would just get lost with -fwhole-file. 4! 5! Contributed by Joost VandeVandole <jv244@cam.ac.uk> 6! 7SUBROUTINE c() 8 CALL a() 9END SUBROUTINE c 10 11SUBROUTINE a() 12END SUBROUTINE a 13 14MODULE M 15CONTAINS 16 SUBROUTINE b() 17 CALL c() 18 END SUBROUTINE 19END MODULE 20 21USE M 22CALL b() 23END 24