This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran] PR 41800: [OOP] ICE in fold_convert_loc, at fold-const.c:2789


Hi all,

here is a one-line fix for another OOP problem, connected to
CLASS-valued functions.

Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


2009-10-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/41800
	* trans-expr.c (gfc_trans_scalar_assign): Handle CLASS variables.


2009-10-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/41800
	* gfortran.dg/class_10.f03: New test.
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c	(Revision 153496)
+++ gcc/fortran/trans-expr.c	(Arbeitskopie)
@@ -4660,7 +4660,7 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rs
 	  gfc_add_expr_to_block (&block, tmp);
 	}
     }
-  else if (ts.type == BT_DERIVED)
+  else if (ts.type == BT_DERIVED || ts.type == BT_CLASS)
     {
       gfc_add_block_to_block (&block, &lse->pre);
       gfc_add_block_to_block (&block, &rse->pre);

Attachment: class_10.f03
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]