2 ! { dg-options "-O2 -fcheck=bounds" }
4 FUNCTION F06FKFN(N
,W
,INCW
,X
,INCX
)
6 INTEGER, PARAMETER :: WP
= KIND(0.0D0
)
7 REAL (KIND
=WP
) :: F06FKFN
8 REAL (KIND
=WP
), PARAMETER :: ONE
= 1.0E+0_WP
9 REAL (KIND
=WP
), PARAMETER :: ZERO
= 0.0E+0_WP
10 INTEGER, INTENT (IN
) :: INCW
, INCX
, N
11 REAL (KIND
=WP
), INTENT (IN
) :: W(*), X(*)
12 REAL (KIND
=WP
) :: ABSYI
, NORM
, SCALE
, SSQ
14 REAL (KIND
=WP
), EXTERNAL :: F06BMFN
19 NORM
= SQRT(W(1))*ABS(X(1))
34 IF ((W(IW
)/=ZERO
) .AND
. (X(IX
)/=ZERO
)) THEN
35 ABSYI
= SQRT(W(IW
))*ABS(X(IX
))
37 SSQ
= 1 + SSQ
*(SCALE
/ABSYI
)**2
40 SSQ
= SSQ
+ (ABSYI
/SCALE
)**2
46 NORM
= F06BMFN(SCALE
,SSQ
)