This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch, Fortran, committed] PR57556 - Fix ordering issue in gfc_build_final_call
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Fri, 07 Jun 2013 15:33:45 +0200
- Subject: [Patch, Fortran, committed] PR57556 - Fix ordering issue in gfc_build_final_call
It helps to initialize a block before calling "gfc_add_block_to_block
(&block" ...
Committed as Rev. 199812 after building and regtesting on x86-64-gnu-linux.
Tobias
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog (Revision 199811)
+++ gcc/fortran/ChangeLog (Arbeitskopie)
@@ -1,3 +1,8 @@
+2013-06-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57556
+ * trans.c (gfc_build_final_call): Init block before use.
+
2013-06-06 Tobias Burnus <burnus@net-b.de>
PR fortran/57542
Index: gcc/fortran/trans.c
===================================================================
--- gcc/fortran/trans.c (Revision 199811)
+++ gcc/fortran/trans.c (Arbeitskopie)
@@ -852,6 +852,7 @@ gfc_build_final_call (gfc_typespec ts, gfc_expr *f
gcc_assert (final_wrapper->expr_type == EXPR_VARIABLE);
gcc_assert (var);
+ gfc_start_block (&block);
gfc_init_se (&se, NULL);
gfc_conv_expr (&se, final_wrapper);
final_fndecl = se.expr;
@@ -936,7 +937,6 @@ gfc_build_final_call (gfc_typespec ts, gfc_expr *f
if (!POINTER_TYPE_P (TREE_TYPE (array)))
array = gfc_build_addr_expr (NULL, array);
- gfc_start_block (&block);
gfc_add_block_to_block (&block, &se.pre);
tmp = build_call_expr_loc (input_location,
final_fndecl, 3, array,