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



Tobias Burnus <burnus at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |burnus at gcc dot gnu.org



--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-28 
11:03:34 UTC ---

(In reply to comment #7)

> -  if (tsource->expr_type != EXPR_CONSTANT

> -      || fsource->expr_type != EXPR_CONSTANT

> -      || mask->expr_type != EXPR_CONSTANT)

> +  if (mask->expr_type != EXPR_CONSTANT)

>      return NULL;



That makes sense: If mask is a constant scalar, tsource or fsource can be used.

That patch is pre-approved.





However, at some point one has also to simplify:

  MERGE([1,2],[11,22], [.true.,.false.])

and for that case, all arguments have to be gfc_is_constant_expr(). At least

Fortran 2008 requires that the processor can do such a simplification. (One

could also handle the special case that mask is an array of only .true. or only

.false.)

Reply via email to