{patch, fortran] PR38718: add simplifier for MERGE

Daniel Franke franke.daniel@gmail.com
Sun Jan 4 15:00:00 GMT 2009


Hi all.

MERGE is an elemental intrinsic function and as such allowed in initialization 
expressions. However, up until now, there was no simplifier for MERGE, thus 
init expr using it were rejected (not directly but with a somewhat cryptic 
error). 

The PR lists more elemental functions were simplifiers are missing, but MERGE 
is the only one from F95.


gcc/fortran:
2009-01-04  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/38718
	* simplify.c (gfc_simplify_merge): New.
	* intrinsic.h (gfc_simplify_merge): New prototype.
	* intrinsic.c (add_functions): Added simplification for MERGE.

gcc/testsuite:
2009-01-04  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/38718
	* gfortran.dg/merge_init_expr.f90: New.


Regression tested on i686-pc-linux-gnu. Ok for trunk?

Regards

	Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr38718-merge.diff
Type: text/x-patch
Size: 3149 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090104/95939b22/attachment.bin>


More information about the Fortran mailing list