blob: 47632bb7c0139746ee21a7a29c7d8f207a26b57b [file] [log] [blame]
! { dg-do compile }
! { dg-options "-O -fno-inline -fdump-tree-optimized -fdump-tree-original" }
! PR fortran/41453
! Check that there is one clobber in the *.original tree, plus that
! the constant 123456789 has been removed due to the INTENT(OUT).
module x
implicit none
contains
subroutine foo(a)
integer, intent(out) :: a
a = 42
end subroutine foo
end module x
program main
use x
implicit none
integer :: a
a = 123456789
call foo(a)
print *,a
end program main
! { dg-final { scan-tree-dump-times "123456789" 0 "optimized" } }
! { dg-final { scan-tree-dump-times "CLOBBER" 1 "original" } }