1! { dg-do compile } 2! { dg-options "-O2 -fdump-tree-optimized" } 3! 4! Check whether the "does_not_exist" subroutine has been 5! optimized away, i.e. check that "foo"'s intent(IN) gets 6! honoured. 7! 8! PR fortran/43665 9! 10interface 11 subroutine foo(x) 12 integer, intent(in) :: x 13 end subroutine foo 14end interface 15 16integer :: y 17 18y = 5 19call foo(y) 20if (y /= 5) call does_not_exist () 21end 22 23! { dg-final { scan-tree-dump-times "does_not_exist" 0 "optimized" } } 24! { dg-final { cleanup-tree-dump "optimized" } } 25