[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / matmul_12.f90
blob5badd3f0b11f18a5c85b91b11de370b30910b843
1 ! { dg-do run }
2 program main
3 integer, parameter :: sz=5, su=3
4 integer, parameter :: l=2
5 integer, parameter :: u=l-1+su
6 integer(kind=4), dimension(sz,sz) :: r,a,b
7 integer :: i,j
8 do i=1,4
9 do j=1,4
10 a(i,j) = i*10+j
11 b(i,j) = 100+i*10+j
12 end do
13 end do
14 r = -1
15 b(l:u,l:u) = reshape([(i,i=1,su*su)],[su,su]);
16 a(l:u,l:u) = reshape([(i,i=1,su*su)],[su,su]);
18 r(1:su,1:su) = matmul(a(l:u,l:u),b(l:u,l:u))
19 if (any(reshape(r,[sz*sz]) /= [30, 36, 42, -1, -1, 66, 81, 96, -1, -1,&
20 & 102, 126, 150, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1])) &
21 call abort
22 end program main