[Bug fortran/33197] Fortran 2008: math functions

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Aug 22 19:32:00 GMT 2010



------- Comment #37 from burnus at gcc dot gnu dot org  2010-08-22 19:32 -------
Created an attachment (id=21545)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21545&action=view)
Draft patch for NORM2 -- and draft run-time test, early PARITY patch

Draft patch for NORM2; as PARITY is essentially the same -- thus, an untested
PARITY implementation is included as well.

TODO
- There is some bug in converting the call for NORM2 - probably in
trans-intrinsic.c; result: a segfault for the run-time version at compile time
- Inline run-time version missing, cf. ISYM_SUM - possibly use lib version with
-Os?
- Test cases

- PARITY: What about logical kinds 1 and 2? Or how to handle this better? --
and the same issues as for NORM2.
Note, a simple conversion only works for scalars not for arrays - which require
would require a temporary. I could image that INTEGER(1) is often used due to
its smaller storage size.

PS: NORM2 is described as "careful calculation of Euclidean norm" in the BCS
slides and in the what's new in F2008 article. Currently, I use the trivial
brute-force method. Maybe something more careful should be done?


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17315|0                           |1
        is obsolete|                            |
  Attachment #18173|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197



More information about the Gcc-bugs mailing list