2 ! Test fix for PR114141
3 ! Contributed by Steve Kargl <sgk@troutmask.apl.washington.edu>
7 associate (x
=> log(cmplx(-1,0)))
8 y
= x
%im
! Gave 'Symbol ‘x’ at (1) has no IMPLICIT type'
9 if (int(100*y
)-314 /= 0) stop 1
12 ! Check wrinkle in comment 1 (parentheses around selector) of the PR is fixed.
13 associate (x
=> ((log(cmplx(-1,1)))))
14 y
= x
%im
! Gave 'The RE or IM part_ref at (1) must be applied to a
16 if (int(100*y
)-235 /= 0) stop 2
19 ! Check that more complex(pun intended!) expressions are OK.
20 associate (x
=> exp (log(cmplx(-1,0))+cmplx(0,0.5)))
21 y
= x
%re
! Gave 'Symbol ‘x’ at (1) has no IMPLICIT type'
22 if (int(1000*y
)+877 /= 0) stop 3
25 ! Make sure that AIMAG intrinsic is OK.
26 associate (x
=> ((log(cmplx(-1,0.5)))))
28 if (int(100*y
)-267 /= 0) stop 4