This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [PATCH,fortran/32942] Give EXPONENT the correct return type


2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>

	PR fortran/32942
	*trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
	type.

OK to commit.


It looks like many of the -fdefault-integer-8 bugs will allow us to catch occurences of these problems. I'm currently regtesting the following fix for PR 32938, which I'll commit as obvious as soon as regtest is finished (along with ChangeLog entry and testcase, of course).


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 ());


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