public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Feng Wang <wf_cs@yahoo.com>
To: Jakub Jelinek <jakub@redhat.com>, Tobias Burnus <burnus@net-b.de>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH] Fold VIEW_CONVERT_EXPR <type, STRING_CST> generated by  Fortran FE a lot (PR target/35366)
Date: Wed, 12 Nov 2008 18:09:00 -0000	[thread overview]
Message-ID: <513146.55301.qm@web15102.mail.cnb.yahoo.com> (raw)
In-Reply-To: <20081112120242.GM3572@tyan-ft48-01.lab.bos.redhat.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=big5, Size: 1640 bytes --]

Hi Jakub, hi all,

--- Jakub Jelinek <jakub@redhat.com> wrote:

> Hi!
> 
> On Tue, Nov 11, 2008 at 11:34:29PM +0100, Tobias Burnus wrote:
> > Brooks Moses wrote:
> > +		gfc_warning ("Assigning value other than 0 or 1 to LOGICAL"
> > +			     " at %L has undefined result", &expr->where);
> > > The warning could perhaps be edited a little, too, to reflect that the
> > > user isn't necessarily thinking of the input as an integer.  Maybe:
> > > "Cannot assign value with bitwise representation other than 0x0 or 0x1
> > > to LOGICAL at %L".
> > 
> > I find the original string clearer than especially the "0x0 or 0x1".
> 
> So, here is an updated patch, which
> 1) handles transfer (transfer (x, .false.), something) the same way
>    as transfer (transfer (x, 0), something) (i.e. uses INTEGER_TYPE
>    of the same mode as the BOOLEAN_TYPE that was used previously)
> 2) testcases have been updated
> 3) no checking for INTEGER_CST result from fold_buil1 (V_C_E, ...),
>    it just uses integer_zerop and integer_onep.
> 
> The middle-end side hasn't changed.

I agree with the use of INTEGER_TYPE, but I don't think it is necessary to give
a warning message. After using INTEGER_TYPE, will other parts still change the
value? What's more, if the warning is given to the transfer and Hollerith
constants, what about the assignment of integer constants? For example:

logical l
l = 45

I cannot access my machine now, so I am not sure that whether this has been
dealt with in some other place.


Best Regards,
Feng Wang

_______________________________________
 »¶Ó­Ê¹Óó¬´óÈÝÁ¿ÑÅ»¢ÓÊÏä 
 http://cn.mail.yahoo.com 

  parent reply	other threads:[~2008-11-12 17:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11 22:53 Tobias Burnus
2008-11-12 14:20 ` Jakub Jelinek
2008-11-12 15:34   ` Paul Richard Thomas
2008-11-12 18:09   ` Feng Wang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-11-11 13:27 Jakub Jelinek
2008-11-11 15:40 ` Richard Guenther
2008-11-11 15:53 ` Tobias Schlüter
2008-11-11 16:22   ` Paul Richard Thomas
2008-11-11 16:45     ` Tobias Schlüter
2008-11-11 16:22   ` Jakub Jelinek
2008-11-11 16:26     ` Tobias Schlüter
2008-11-11 17:21       ` Jakub Jelinek
2008-11-11 17:22         ` Tobias Schlüter
2008-11-11 18:10           ` Jakub Jelinek
2008-11-11 19:07             ` Janne Blomqvist
2008-11-11 19:22             ` Brooks Moses
2008-11-11 19:36             ` Tobias Burnus
2008-11-11 20:50               ` Brooks Moses
2008-11-11 21:38                 ` Jakub Jelinek
2008-11-11 21:41                   ` Brooks Moses
2008-11-11 21:46                     ` Jakub Jelinek
2008-11-11 22:31                       ` Brooks Moses
2008-11-11 21:27             ` Thomas Koenig
2008-11-11 19:17       ` Brooks Moses
2008-11-11 19:34         ` Jakub Jelinek
2008-11-11 19:38           ` Brooks Moses
2008-11-11 17:30     ` Tobias Burnus
2008-11-11 21:56   ` Steve Kargl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513146.55301.qm@web15102.mail.cnb.yahoo.com \
    --to=wf_cs@yahoo.com \
    --cc=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).