2 ! { dg-options "-ffrontend-optimize -Wfunction-elimination" }
3 ! Check the -ffrontend-optimize (in the absence of -O) and
4 ! -Wfunction-elimination options.
7 real, dimension(2,2) :: a, b, c, d
11 real, external :: ext_func
13 elemental function element(x)
17 pure function mypure(x)
21 elemental impure function elem_impure(x)
24 end function elem_impure
27 data a /2., 3., 5., 7./
28 data b /11., 13., 17., 23./
29 write (unit=line, fmt='(4F7.2)') matmul(a,b) & ! { dg-warning "Removing call to function 'matmul'" }
31 z = sin(x) + 2.0 + sin(x) ! { dg-warning "Removing call to function 'sin'" }
33 x = ext_func(a) + 23 + ext_func(a)
35 z = element(x) + element(x) ! { dg-warning "Removing call to function 'element'" }
37 i = mypure(x) - mypure(x) ! { dg-warning "Removing call to function 'mypure'" }
39 z = elem_impure(x) - elem_impure(x)