aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-10-06 15:59:31 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-10-06 15:59:31 +0000
commit3db5d687b485630201b905fae8f54cf39c65cc6a (patch)
tree1e4489346bf74d625a3d7f75b6972c82f5b92e10 /gcc/fortran
parent363aab219509999ae48a7c8e5c515e7d82f08474 (diff)
downloadgcc-3db5d687b485630201b905fae8f54cf39c65cc6a.zip
gcc-3db5d687b485630201b905fae8f54cf39c65cc6a.tar.gz
gcc-3db5d687b485630201b905fae8f54cf39c65cc6a.tar.bz2
trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to gfc_advance_se_ss_chain.
2010-10-06 Mikael Morin <mikael@gcc.gnu.org> * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to gfc_advance_se_ss_chain. * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call, gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref. * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto. * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto. From-SVN: r165046
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog10
-rw-r--r--gcc/fortran/trans-array.c1
-rw-r--r--gcc/fortran/trans-expr.c5
-rw-r--r--gcc/fortran/trans-intrinsic.c7
-rw-r--r--gcc/fortran/trans-stmt.c18
5 files changed, 17 insertions, 24 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 384842d..4c8cec4 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,15 @@
2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
+ * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
+ gfc_advance_se_ss_chain.
+ * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
+ gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
+ calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
+ * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
+ * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
+
+2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
+
* trans.c (gfc_restore_backend_locus): New function.
(gfc_get_backend_locus): Renamed to ...
(gfc_save_backend_locus): ... this.
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 271b37c..f70d16e 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -2552,6 +2552,7 @@ gfc_conv_tmp_array_ref (gfc_se * se)
{
se->string_length = se->ss->string_length;
gfc_conv_scalarized_array_ref (se, NULL);
+ gfc_advance_se_ss_chain (se);
}
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index a6837c9..d662d20 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2354,7 +2354,6 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
gfc_conv_expr (&rse, expr);
gfc_conv_tmp_array_ref (&lse);
- gfc_advance_se_ss_chain (&lse);
if (intent != INTENT_OUT)
{
@@ -2829,7 +2828,6 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
/* Access the previously obtained result. */
gfc_conv_tmp_array_ref (se);
- gfc_advance_se_ss_chain (se);
return 0;
}
}
@@ -3977,7 +3975,6 @@ gfc_conv_array_constructor_expr (gfc_se * se, gfc_expr * expr)
gcc_assert (se->ss->expr == expr && se->ss->type == GFC_SS_CONSTRUCTOR);
gfc_conv_tmp_array_ref (se);
- gfc_advance_se_ss_chain (se);
}
@@ -5679,7 +5676,6 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
if (l_is_temp)
{
gfc_conv_tmp_array_ref (&lse);
- gfc_advance_se_ss_chain (&lse);
if (expr2->ts.type == BT_CHARACTER)
lse.string_length = string_length;
}
@@ -5730,7 +5726,6 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
lse.ss = lss;
gfc_conv_tmp_array_ref (&rse);
- gfc_advance_se_ss_chain (&rse);
gfc_conv_expr (&lse, expr1);
gcc_assert (lse.ss == gfc_ss_terminator
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 6e9bfaf..a43bfc2 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -6089,11 +6089,8 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
case GFC_ISYM_TRANSFER:
if (se->ss && se->ss->useflags)
- {
- /* Access the previously obtained result. */
- gfc_conv_tmp_array_ref (se);
- gfc_advance_se_ss_chain (se);
- }
+ /* Access the previously obtained result. */
+ gfc_conv_tmp_array_ref (se);
else
gfc_conv_intrinsic_transfer (se, expr);
break;
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 82cddd7..12ebe4a 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -3740,10 +3740,7 @@ gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2,
/* Translate the expression. */
gfc_conv_expr (&rse, expr2);
if (lss != gfc_ss_terminator && loop.temp_ss != NULL)
- {
- gfc_conv_tmp_array_ref (&lse);
- gfc_advance_se_ss_chain (&lse);
- }
+ gfc_conv_tmp_array_ref (&lse);
else
gfc_conv_expr (&lse, expr1);
@@ -3796,7 +3793,6 @@ gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2,
lse.ss = lss;
gfc_conv_tmp_array_ref (&rse);
- gfc_advance_se_ss_chain (&rse);
gfc_conv_expr (&lse, expr1);
gcc_assert (lse.ss == gfc_ss_terminator
@@ -4201,10 +4197,7 @@ gfc_trans_where_3 (gfc_code * cblock, gfc_code * eblock)
gfc_conv_expr (&tsse, tsrc);
if (tdss != gfc_ss_terminator && loop.temp_ss != NULL)
- {
- gfc_conv_tmp_array_ref (&tdse);
- gfc_advance_se_ss_chain (&tdse);
- }
+ gfc_conv_tmp_array_ref (&tdse);
else
gfc_conv_expr (&tdse, tdst);
@@ -4212,12 +4205,9 @@ gfc_trans_where_3 (gfc_code * cblock, gfc_code * eblock)
{
gfc_conv_expr (&esse, esrc);
if (edss != gfc_ss_terminator && loop.temp_ss != NULL)
- {
- gfc_conv_tmp_array_ref (&edse);
- gfc_advance_se_ss_chain (&edse);
- }
+ gfc_conv_tmp_array_ref (&edse);
else
- gfc_conv_expr (&edse, edst);
+ gfc_conv_expr (&edse, edst);
}
tstmt = gfc_trans_scalar_assign (&tdse, &tsse, tdst->ts, false, false, true);