From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11910 invoked by alias); 31 Jul 2007 20:44:29 -0000 Received: (qmail 11896 invoked by uid 22791); 31 Jul 2007 20:44:28 -0000 X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.189) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 31 Jul 2007 20:44:23 +0000 Received: by fk-out-0910.google.com with SMTP id 26so544611fkx for ; Tue, 31 Jul 2007 13:44:19 -0700 (PDT) Received: by 10.82.111.8 with SMTP id j8mr15251buc.1185914659100; Tue, 31 Jul 2007 13:44:19 -0700 (PDT) Received: from ?144.82.208.57? ( [144.82.208.57]) by mx.google.com with ESMTPS id f6sm20059355nfh.2007.07.31.13.44.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2007 13:44:14 -0700 (PDT) In-Reply-To: <20070731203157.GA30019@troutmask.apl.washington.edu> References: <20070731203157.GA30019@troutmask.apl.washington.edu> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Transfer-Encoding: 7bit From: FX Coudert Subject: Re: [PATCH,fortran/32942] Give EXPONENT the correct return type Date: Tue, 31 Jul 2007 21:25:00 -0000 To: Steve Kargl X-Mailer: Apple Mail (2.752.3) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg02205.txt.bz2 > 2007-07-31 Steven G. Kargl > > 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 ());