2 ! { dg-options "-ffrontend-optimize -finline-matmul-limit=0 -fdump-tree-original" }
3 ! PR 37131 - no inlining with -finline-matmul-limit=0
5 real, dimension(3,2) :: a
6 real, dimension(2,4) :: b
7 real, dimension(3,4) :: c
8 real, dimension(3,4) :: cres
9 real, dimension(:,:), allocatable
:: calloc
10 integer :: a1
= size(a
,1), a2
= size(a
,2)
11 integer :: b1
= size(b
,1), b2
= size(b
,2)
12 integer :: c1
= size(c
,1), c2
= size(c
,2)
14 data a
/ 2., -3., 5., -7., 11., -13./
15 data b
/17., -23., 29., -31., 37., -39., 41., -47./
16 data cres
/195., -304., 384., 275., -428., 548., 347., -540., 692., 411., -640., 816./
18 if (sum(c
-cres
)>1e-4) call abort
21 if (sum(calloc
-cres
)>1e-4) call abort
22 if (any([size(calloc
,1), size(calloc
,2)] /= [3,4])) call abort
27 if (sum(calloc
-cres
)>1e-4) call abort
28 if (any([size(calloc
,1), size(calloc
,2)] /= [3,4])) call abort
33 if (sum(calloc
-cres
)>1e-4) call abort
34 if (any([size(calloc
,1), size(calloc
,2)] /= [3,4])) call abort
38 real :: aa(a1
, a2
), bb(b1
, b2
), cc(c1
, c2
)
43 if (sum(cc
-cres
)>1e-4) call abort
44 calloc
= matmul(aa
,bb
)
45 if (sum(calloc
-cres
)>1e-4) call abort
46 if (any([size(calloc
,1), size(calloc
,2)] /= [3,4])) call abort
51 calloc
= matmul(aa
,bb
)
52 if (sum(calloc
-cres
)>1e-4) call abort
53 if (any([size(calloc
,1), size(calloc
,2)] /= [3,4])) call abort
57 calloc
= matmul(aa
,bb
)
58 if (sum(calloc
-cres
)>1e-4) call abort
59 if (any([size(calloc
,1), size(calloc
,2)] /= [3,4])) call abort
64 ! { dg-final { scan-tree-dump-times "_gfortran_matmul" 8 "original" } }