2 ! { dg-options "-O -finline-matmul-limit=0 -faggressive-function-elimination -fdump-tree-original" }
5 real, dimension(2,2) :: a
, b
, c
, d
9 real, external :: ext_func
11 elemental
function element(x
)
15 pure
function mypure(x
)
19 elemental impure
function elem_impure(x
)
22 end function elem_impure
25 data a
/2., 3., 5., 7./
26 data b
/11., 13., 17., 23./
27 write (unit
=line
, fmt
='(4F7.2)') matmul(a
,b
) + matmul(a
,b
)
29 z
= sin(x
) + cos(x
) + sin(x
) + cos(x
)
31 x
= ext_func(a
) + 23 + ext_func(a
)
33 z
= element(x
) + element(x
)
35 i
= mypure(x
) - mypure(x
)
37 z
= elem_impure(x
) - elem_impure(x
)
40 ! { dg-final { scan-tree-dump-times "matmul_r4" 1 "original" } }
41 ! { dg-final { scan-tree-dump-times "__builtin_sinf" 1 "original" } }
42 ! { dg-final { scan-tree-dump-times "__builtin_cosf" 1 "original" } }
43 ! { dg-final { scan-tree-dump-times "ext_func" 1 "original" } }
44 ! { dg-final { scan-tree-dump-times "element" 1 "original" } }
45 ! { dg-final { scan-tree-dump-times "mypure" 1 "original" } }
46 ! { dg-final { scan-tree-dump-times "elem_impure" 1 "original" } }