{patch, fortran] PR38718: add simplifier for MERGE

Daniel Kraft d@domob.eu
Sun Jan 4 15:45:00 GMT 2009


Daniel Franke wrote:
> 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?

Ok.  I'm not sure whether we should wait for 4.5, but my opinion is that 
the change is quite clear and it should be ok for trunk, it actually 
fixes a rejects-valid bug.

Thanks for fixing this!

Daniel

-- 
Done:  Arc-Bar-Cav-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran



More information about the Gcc-patches mailing list