re PR fortran/32938 (ICE in emit_move_insn with -fdefault-integer-8)

PR fortran/32938
	* trans-stmt.c (gfc_trans_return): Convert to correct type.
	* gfortran.dg/altreturn_6.f90: New test.

From-SVN: r127106
This commit is contained in:
Francois-Xavier Coudert 2007-07-31 21:15:45 +00:00 committed by François-Xavier Coudert
parent 14b1261a5b
commit 7d520b9b12
4 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32938
* trans-stmt.c (gfc_trans_return): Convert to correct type.
2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/32942

View File

@ -447,7 +447,8 @@ gfc_trans_return (gfc_code * code ATTRIBUTE_UNUSED)
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 ());

View File

@ -1,3 +1,8 @@
2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32938
* gfortran.dg/altreturn_6.f90: New test.
2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/32942

View File

@ -0,0 +1,5 @@
! PR 32938
subroutine r (*)
integer(kind=8) :: i
return i
end