diff options
author | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 00:23:14 +0000 |
---|---|---|
committer | mikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 00:23:14 +0000 |
commit | 85b3b7b7f59c24651efc30c7ca4bc1c2e8f13a12 (patch) | |
tree | 633c592c8c1de71d75bd0614c6556a8c9855460f /gcc/fortran | |
parent | cae7ff32d79ba9f909443a724a93b9bf6eb94932 (diff) | |
download | gcc-85b3b7b7f59c24651efc30c7ca4bc1c2e8f13a12.tar.gz |
* trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
expression variable. Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180919 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 01d43747388..f9bd3eb5718 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,10 @@ 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. diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index f7b10416f98..25c54fb6db9 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -2574,6 +2574,7 @@ gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op, gfc_ss *maskss; gfc_se arrayse; gfc_se maskse; + gfc_se *parent_se; gfc_expr *arrayexpr; gfc_expr *maskexpr; @@ -2582,6 +2583,8 @@ gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op, gfc_conv_intrinsic_funcall (se, expr); return; } + else + parent_se = NULL; type = gfc_typenode_for_spec (&expr->ts); /* Initialize the result. */ @@ -2654,7 +2657,7 @@ gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op, /* 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); @@ -2666,7 +2669,7 @@ gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op, 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); |