view gcc/testsuite/gfortran.dg/whole_file_22.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do link }
! { dg-options "-fwhole-program -O3 -g" }
!
! PR fortran/40873
!
      program prog
        call one()
        call two()
        call test()
      end program prog
      subroutine one()
        call three()
      end subroutine one
      subroutine two()
        call three()
      end subroutine two
      subroutine three()
      end subroutine three

SUBROUTINE c()
 CALL a()
END SUBROUTINE c

SUBROUTINE a()
END SUBROUTINE a

MODULE M
CONTAINS
 SUBROUTINE b()
   CALL c()
 END SUBROUTINE
END MODULE

subroutine test()
USE M
CALL b()
END