[Fortran,committed] Fix build failure with C

Submitted by Tobias Burnus on July 21, 2012, 9:28 a.m.

Details

Message ID 500A764B.7000609@net-b.de
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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