* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr38722.f90
blob7a4f63e869c081cbd7e1085d3e2354fd84d7bbca
1 ! PR rtl-optimization/38722
2 ! { dg-do compile }
3 ! { dg-options "-O1" }
4 SUBROUTINE foo(x, n, ga, gc, vr)
5 TYPE pt
6 DOUBLE PRECISION, DIMENSION (:, :, :), POINTER :: cr
7 END TYPE pt
8 TYPE pu
9 TYPE(pt), POINTER :: pw
10 END TYPE pu
11 LOGICAL, INTENT(in) :: x, ga, gc
12 INTEGER :: i, n
13 LOGICAL :: dd, ep, fe
14 TYPE(pu) :: vr
15 TYPE(pu), DIMENSION(:), POINTER :: v
16 IF (.NOT. fe) THEN
17 IF (ga) THEN
18 CALL bar (dd, ep, gc)
19 END IF
20 IF (x .AND. .NOT. ga) THEN
21 IF (gc) THEN
22 DO i=1,n
23 CALL baz (v(i), x, gc)
24 v(i)%pw%cr = 1.0
25 END DO
26 DO i=1,n
27 IF (ep) THEN
28 IF (dd) THEN
29 IF (i==1) THEN
30 v(i)%pw%cr=v(i)%pw%cr + vr%pw%cr
31 ENDIF
32 END IF
33 END IF
34 END DO
35 END IF
36 ENDIF
37 END IF
38 END SUBROUTINE foo