c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr109265.f90
blob0d7124c7741fcb59f45bf52ca5ab7763986b0e06
1 ! PR tree-optimization/109265
2 ! { dg-do compile }
3 ! { dg-options "-O3 -w" }
5 module pr109265
6 integer, parameter :: r8 = selected_real_kind (12)
7 contains
8 subroutine foo (b, c, d, e, f)
9 implicit none
10 logical :: b
11 real (kind = r8) :: c, d, e, f, i
12 if (b) then
13 c = bar (c * d, e)
14 i = bar (f, c)
15 call baz (i)
16 call baz (-i)
17 end if
18 end subroutine foo
19 function bar (a, b)
20 implicit none
21 real (kind = r8) :: bar
22 real (kind = r8) :: a, b
23 bar = a + b
24 end function bar
25 subroutine baz (b)
26 implicit none
27 real (kind = r8) :: b, d, e, f, g, h, i
28 d = b
29 i = 0
30 e = d
31 f = d
32 g = d
33 10 continue
34 if ((e.eq.d) .and. (f.eq.d) .and. (g.eq.d) .and. (h.eq.d)) then
35 h = i
36 goto 10
37 end if
38 end subroutine baz
39 end module pr109265