Am 26.03.2013 18:17, schrieb Thomas Koenig:
Hi Tobias,
I have not yet looked at the patch, but I wonder whether that causes
invalid code for
if (any([a,b,c] < f()))
by evaluating f() multiple times.
This is avoided by this part of the patch:
+ if (op2->expr_type == EXPR_CONSTANT)
+ scalar = gfc_copy_expr (op2);
+ else
+ scalar = create_var (gfc_copy_expr (op2));
which results in code like this:
__var_1 = f ();
if ((a > __var_1 || b > __var_1) || c > __var_1)
{
{
Are there any other concerns, or can I commit this?
Regards
Thomas