(j3.2006) Fw: a question on MERGE and expression evaluation
Jim Xia
jimxia
Thu Nov 18 21:31:43 EST 2010
> Jim's customer wants to count on
>
> merge(1.0/a,0,a/=0.0)
>
> not working when a == 0. Why would you want that not to work? I would
> much prefer that it be guaranteed to work, rather than that it work or
> not work at the compiler's whim.
More accurately, it is claimed that divid-by-zero exception MUST be
raised. That's different from "not working when a == 0". The first time
when I saw this defect, my immediate reaction was "this must be a C
programmer who hates optimizations". However after plowing through the
F08 for the relevant text, I did find 12.5.3 which I really don't think
worded correctly. I believe we should fix that paragraph.
Cheers,
Jim Xia
XL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444 Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM
http://www.ibm.com/software/awdtools/fortran/xlfortran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20101118/f881fbfa/attachment.htm>
More information about the J3
mailing list