[gfortran] PR 15327: Fix merge intrinsic for strings
Paul Brook
paul@codesourcery.com
Wed Sep 1 23:09:00 GMT 2004
On Wednesday 01 September 2004 23:37, Tobias Schlüter wrote:
> Paul Brook wrote:
> > merge (a, b, flag) should expand to
> > _result = flag?a:b; _result_length = len(a)
> > ie. basically the same as the numeric case, but also setting the string
> > length.
>
> Done. Updated patch below. Yes, this is much better.
>
> Built and tested. OK?
>
> - Tobi
>
> 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
>
> PR fortran/15327
> * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
> strings.
Ok, except you might want to consider:
> ! type = TREE_TYPE (tsource);
> ! se->expr = fold (build3 (COND_EXPR, type, mask, tsource, fsource));
This is the same in both cases, so could be moved outside the if.
Paul
More information about the Gcc-patches
mailing list