c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / intent_optimize_2.f90
blob47632bb7c0139746ee21a7a29c7d8f207a26b57b
1 ! { dg-do compile }
2 ! { dg-options "-O -fno-inline -fdump-tree-optimized -fdump-tree-original" }
3 ! PR fortran/41453
4 ! Check that there is one clobber in the *.original tree, plus that
5 ! the constant 123456789 has been removed due to the INTENT(OUT).
7 module x
8 implicit none
9 contains
10 subroutine foo(a)
11 integer, intent(out) :: a
12 a = 42
13 end subroutine foo
14 end module x
16 program main
17 use x
18 implicit none
19 integer :: a
20 a = 123456789
21 call foo(a)
22 print *,a
23 end program main
25 ! { dg-final { scan-tree-dump-times "123456789" 0 "optimized" } }
26 ! { dg-final { scan-tree-dump-times "CLOBBER" 1 "original" } }