This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24936] Internal error with forall and character arrays and pointers
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2006 18:33:24 -0000
- Subject: [Bug fortran/24936] Internal error with forall and character arrays and pointers
- References: <bug-24936-8649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-01-09 18:33 -------
Here is that patch:
[zhivago:gcc/gcc/fortran] pinskia% svn diff trans-stmt.c
Index: trans-stmt.c
===================================================================
--- trans-stmt.c (revision 109491)
+++ trans-stmt.c (working copy)
@@ -2122,7 +2122,8 @@ gfc_trans_pointer_assign_need_temp (gfc_
rse.want_pointer = 1;
gfc_conv_expr (&rse, expr2);
gfc_add_block_to_block (&body, &rse.pre);
- gfc_add_modify_expr (&body, lse.expr, rse.expr);
+ gfc_add_modify_expr (&body, lse.expr,
+ fold_convert (TREE_TYPE (lse.expr), rse.expr));
gfc_add_block_to_block (&body, &rse.post);
/* Increment count. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24936