expression variable. Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180919
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
+ * trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
+ expression variable. Use it.
+
+2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
+
* trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
pointer. Use it.
* trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
pointer. Use it.
gfc_ss *maskss;
gfc_se arrayse;
gfc_se maskse;
gfc_ss *maskss;
gfc_se arrayse;
gfc_se maskse;
gfc_expr *arrayexpr;
gfc_expr *maskexpr;
gfc_expr *arrayexpr;
gfc_expr *maskexpr;
gfc_conv_intrinsic_funcall (se, expr);
return;
}
gfc_conv_intrinsic_funcall (se, expr);
return;
}
+ else
+ parent_se = NULL;
type = gfc_typenode_for_spec (&expr->ts);
/* Initialize the result. */
type = gfc_typenode_for_spec (&expr->ts);
/* Initialize the result. */
/* If we have a mask, only add this element if the mask is set. */
if (maskexpr && maskexpr->rank > 0)
{
/* If we have a mask, only add this element if the mask is set. */
if (maskexpr && maskexpr->rank > 0)
{
- gfc_init_se (&maskse, NULL);
+ gfc_init_se (&maskse, parent_se);
gfc_copy_loopinfo_to_se (&maskse, ploop);
maskse.ss = maskss;
gfc_conv_expr_val (&maskse, maskexpr);
gfc_copy_loopinfo_to_se (&maskse, ploop);
maskse.ss = maskss;
gfc_conv_expr_val (&maskse, maskexpr);
gfc_init_block (&block);
/* Do the actual summation/product. */
gfc_init_block (&block);
/* Do the actual summation/product. */
- gfc_init_se (&arrayse, NULL);
+ gfc_init_se (&arrayse, parent_se);
gfc_copy_loopinfo_to_se (&arrayse, ploop);
arrayse.ss = arrayss;
gfc_conv_expr_val (&arrayse, arrayexpr);
gfc_copy_loopinfo_to_se (&arrayse, ploop);
arrayse.ss = arrayss;
gfc_conv_expr_val (&arrayse, arrayexpr);