aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-stmt.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-06-27 20:00:50 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-06-27 20:00:50 +0000
commite7041633a5b9ac8eb09b92de5321bf3184a7b98f (patch)
treefa9685b9314b38bc39469f771fb889342e130b2d /gcc/fortran/trans-stmt.c
parentde8f4b07c03ffb0db0562f462be066684af2f0b7 (diff)
downloadgcc-e7041633a5b9ac8eb09b92de5321bf3184a7b98f.zip
gcc-e7041633a5b9ac8eb09b92de5321bf3184a7b98f.tar.gz
gcc-e7041633a5b9ac8eb09b92de5321bf3184a7b98f.tar.bz2
gfortran.h (gfc_code): Split backend_decl field into cycle_label and exit_label fields.
* gfortran.h (gfc_code): Split backend_decl field into cycle_label and exit_label fields. * trans-openmp.c (gfc_trans_omp_do): Assign to new fields individually. * trans-stmt.c (gfc_trans_simple_do): Likewise. (gfc_trans_do): Likewise. (gfc_trans_do_while): Likewise. (gfc_trans_cycle): Use cycle_label directly. (gfc_trans_exit): Use exit_label directly. From-SVN: r161473
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r--gcc/fortran/trans-stmt.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index ad05426..6fa84b9 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -928,7 +928,8 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
exit_label = gfc_build_label_decl (NULL_TREE);
/* Put the labels where they can be found later. See gfc_trans_do(). */
- code->block->backend_decl = tree_cons (cycle_label, exit_label, NULL);
+ code->block->cycle_label = cycle_label;
+ code->block->exit_label = exit_label;
/* Loop body. */
gfc_start_block (&body);
@@ -1196,12 +1197,10 @@ gfc_trans_do (gfc_code * code, tree exit_cond)
/* Loop body. */
gfc_start_block (&body);
- /* Put these labels where they can be found later. We put the
- labels in a TREE_LIST node (because TREE_CHAIN is already
- used). cycle_label goes in TREE_PURPOSE (backend_decl), exit
- label in TREE_VALUE (backend_decl). */
+ /* Put these labels where they can be found later. */
- code->block->backend_decl = tree_cons (cycle_label, exit_label, NULL);
+ code->block->cycle_label = cycle_label;
+ code->block->exit_label = exit_label;
/* Main loop body. */
tmp = gfc_trans_code_cond (code->block->next, exit_cond);
@@ -1305,7 +1304,8 @@ gfc_trans_do_while (gfc_code * code)
exit_label = gfc_build_label_decl (NULL_TREE);
/* Put the labels where they can be found later. See gfc_trans_do(). */
- code->block->backend_decl = tree_cons (cycle_label, exit_label, NULL);
+ code->block->cycle_label = cycle_label;
+ code->block->exit_label = exit_label;
/* Create a GIMPLE version of the exit condition. */
gfc_init_se (&cond, NULL);
@@ -4080,7 +4080,7 @@ gfc_trans_cycle (gfc_code * code)
{
tree cycle_label;
- cycle_label = TREE_PURPOSE (code->ext.whichloop->backend_decl);
+ cycle_label = code->ext.whichloop->cycle_label;
TREE_USED (cycle_label) = 1;
return build1_v (GOTO_EXPR, cycle_label);
}
@@ -4095,7 +4095,7 @@ gfc_trans_exit (gfc_code * code)
{
tree exit_label;
- exit_label = TREE_VALUE (code->ext.whichloop->backend_decl);
+ exit_label = code->ext.whichloop->exit_label;
TREE_USED (exit_label) = 1;
return build1_v (GOTO_EXPR, exit_label);
}