arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / ipcp-array-2.f90
blob9af8fffa7ea887689e5d3f997c7fc324728b3932
1 ! { dg-do compile }
2 ! { dg-options "-O3 -fno-inline -fwhole-program -fdump-ipa-cp-details -fdump-tree-lversion-details" }
4 module x
5 implicit none
6 contains
7 subroutine foo(a, b)
8 real :: a(:,:)
9 real :: b
10 integer :: i,j
11 b = 0.
12 do j=1,size(a,2)
13 do i=1,size(a,1)
14 b = b + a(i,j) * i * j
15 end do
16 end do
17 end subroutine foo
19 subroutine bar(a, b)
20 real :: a(:,:)
21 real :: b
22 call foo (a,b)
23 end subroutine bar
25 end module x
27 program main
28 use x
29 implicit none
30 integer :: n, m
31 real, dimension(4,3) :: a
32 real, dimension(3,4) :: c
33 real :: b
34 call random_number(a)
35 call bar(a,b)
36 print *,b
38 call random_number(c)
39 call bar(c,b)
40 print *,b
42 end program main
44 ! { dg-final { scan-ipa-dump "op assert_expr 1" "cp" } }
45 ! { dg-final { scan-tree-dump-not "versioned this loop for when certain strides are 1" "lversion" } }