This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32938] ICE in emit_move_insn with -fdefault-integer-8
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2007 20:41:02 -0000
- Subject: [Bug fortran/32938] ICE in emit_move_insn with -fdefault-integer-8
- References: <bug-32938-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-07-31 20:41 -------
Minimal reproducer (at -O1, without -fdefault-integer-8):
subroutine r (*)
integer(kind=8) :: i
return i
end
Mismatch type, fixed by:
Index: trans-stmt.c
===================================================================
--- trans-stmt.c (revision 127059)
+++ trans-stmt.c (working copy)
@@ -447,7 +447,8 @@ gfc_trans_return (gfc_code * code ATTRIB
gfc_conv_expr (&se, code->expr);
- tmp = build2 (MODIFY_EXPR, TREE_TYPE (result), result, se.expr);
+ tmp = build2 (MODIFY_EXPR, TREE_TYPE (result), result,
+ fold_convert (TREE_TYPE (result), se.expr));
gfc_add_expr_to_block (&se.pre, tmp);
tmp = build1_v (GOTO_EXPR, gfc_get_return_label ());
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2007-07-31 20:41:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32938