Patchwork [Fortran,committed] Fix build failure with C

login
register
mail settings
Submitter Tobias Burnus
Date July 21, 2012, 9:28 a.m.
Message ID <500A764B.7000609@net-b.de>
Download mbox | patch
Permalink /patch/172416/
State New
Headers show

Comments

Tobias Burnus - July 21, 2012, 9:28 a.m.
Passing TREE_TYPE() to a Boolean work in C++, but fails in C. Besides, 
passing a "true" makes more sense.

Committed (Rev. ) as obvious.

Tobias

Patch

Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c	(Revision 189738)
+++ gcc/fortran/trans-expr.c	(Arbeitskopie)
@@ -307,8 +307,7 @@ 
 	  gfc_conv_expr_descriptor (parmse, e, ss);
 
 	  if (e->rank != class_ts.u.derived->components->as->rank)
-	    class_array_data_assign (&parmse->pre, ctree, parmse->expr,
-				     TREE_TYPE (parmse->expr));
+	    class_array_data_assign (&parmse->pre, ctree, parmse->expr, true);
 	  else
 	    gfc_add_modify (&parmse->pre, ctree, parmse->expr);
 	}
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 189738)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@ 
+2012-07-21  Tobias Burnus  <burnus@net-b.de>
+
+	* trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
+	to class_array_data_assign.
+
 2012-07-20  Tobias Burnus  <burnus@net-b.de>
 
 	* decl.c (gfc_verify_c_interop_param): Allow assumed-shape