lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / short_circuiting_3.f90
blob069f3f80b947bd9ae59a9d74df286f9af9d08b2a
1 ! { dg-do run }
2 ! { dg-options "-O3" }
4 ! PR 57160: short-circuit IF only with -ffrontend-optimize
6 ! this checks that short-circuiting is done with -O3
8 ! Contributed by Janus Weil <janus@gcc.gnu.org>
10 program short_circuit
12 integer, save :: i = 0
13 logical :: flag
15 flag = .false.
16 flag = check() .and. flag
17 flag = flag .and. check()
19 if (i /= 1) stop 1
21 contains
23 logical function check()
24 i = i + 1
25 check = .true.
26 end function
28 end