diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 3 | ||||
-rw-r--r-- | gcc/fortran/trans-io.c | 3 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 11 |
4 files changed, 15 insertions, 10 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3278c5b..7ba7814 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2017-11-28 Jakub Jelinek <jakub@redhat.com> + + * trans-decl.c (gfc_trans_entry_master_switch): Build SWITCH_EXPR + using fold_build2_loc instead of fold_build3_loc. + * trans-io.c (io_result): Likewise. + * trans-stmt.c (gfc_trans_integer_select, gfc_trans_character_select): + Likewise. + 2017-11-24 Jakub Jelinek <jakub@redhat.com> PR fortran/81304 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 5c248d0..3231fb9 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -5758,8 +5758,7 @@ gfc_trans_entry_master_switch (gfc_entry_list * el) tmp = gfc_finish_block (&block); /* The first argument selects the entry point. */ val = DECL_ARGUMENTS (current_function_decl); - tmp = fold_build3_loc (input_location, SWITCH_EXPR, NULL_TREE, - val, tmp, NULL_TREE); + tmp = fold_build2_loc (input_location, SWITCH_EXPR, NULL_TREE, val, tmp); return tmp; } diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index 9cd33b3..764766d 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -1002,8 +1002,7 @@ io_result (stmtblock_t * block, tree var, gfc_st_label * err_label, rc, build_int_cst (TREE_TYPE (rc), IOPARM_common_libreturn_mask)); - tmp = fold_build3_loc (input_location, SWITCH_EXPR, NULL_TREE, - rc, tmp, NULL_TREE); + tmp = fold_build2_loc (input_location, SWITCH_EXPR, NULL_TREE, rc, tmp); gfc_add_expr_to_block (block, tmp); } diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 96ca217..df29b78 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -2666,8 +2666,7 @@ gfc_trans_integer_select (gfc_code * code) } tmp = gfc_finish_block (&body); - tmp = fold_build3_loc (input_location, SWITCH_EXPR, NULL_TREE, - se.expr, tmp, NULL_TREE); + tmp = fold_build2_loc (input_location, SWITCH_EXPR, NULL_TREE, se.expr, tmp); gfc_add_expr_to_block (&block, tmp); tmp = build1_v (LABEL_EXPR, end_label); @@ -2952,8 +2951,8 @@ gfc_trans_character_select (gfc_code *code) gfc_add_block_to_block (&block, &expr1se.post); tmp = gfc_finish_block (&body); - tmp = fold_build3_loc (input_location, SWITCH_EXPR, NULL_TREE, - case_num, tmp, NULL_TREE); + tmp = fold_build2_loc (input_location, SWITCH_EXPR, NULL_TREE, + case_num, tmp); gfc_add_expr_to_block (&block, tmp); tmp = build1_v (LABEL_EXPR, end_label); @@ -3099,8 +3098,8 @@ gfc_trans_character_select (gfc_code *code) gfc_add_block_to_block (&block, &expr1se.post); tmp = gfc_finish_block (&body); - tmp = fold_build3_loc (input_location, SWITCH_EXPR, NULL_TREE, - case_num, tmp, NULL_TREE); + tmp = fold_build2_loc (input_location, SWITCH_EXPR, NULL_TREE, + case_num, tmp); gfc_add_expr_to_block (&block, tmp); tmp = build1_v (LABEL_EXPR, end_label); |