[Patch, fortran] PR28585: Add Fortran 2003 NEW_LINE intrinsic function

Tobias Burnus burnus@net-b.de
Mon Sep 18 20:27:00 GMT 2006


Hello,

Tobias Burnus wrote on 2006-08-26:
> The new_line implementation is based on achar, I hope thus that it is simple enough that it can be committed while I wait for the reply from assign@gnu.org.
>   
(Still no (e)mail regarding the copyright assignment)

> Remarks:
> (a) I use '\n', for Windows one probably would like to have '\r\n', but the Fortran 2003 standard requires that only a length-one character is returned.
> (b) One can pass either a scalar character or a character array to new_line function.
> The patch below does not work with arrays (ICE in gfc_conv_intrinsic_function). I fail to see how one allows arrays.
>   
This is now fixed; new patch below.

2006-09-18  Tobias Burnus  <burnus@net-b.de>

     PR fortran/28585
     * intrinsic.c(add_functions): Add new_line Fortran 2003 intrinsic
       intrinsic.h: Add gfc_simplify_new_line and gfc_check_new_line prototypes
       check.c: Add gfc_check_new_line
       simplify.c: Add gfc_simplify_new_line
     * gfortran.texi: Include Fortran 2003 in the goals for gfortran
     * intrinsic.text: Document new_line intrinsic;
       cross reference INQUIRE from ACCESS intrinsic.

Tobias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfortran-newline2.diff
Type: text/x-patch
Size: 5804 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060918/bb16a850/attachment.bin>


More information about the Fortran mailing list