public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: c/4214: powerpc64: wrong code from optimized mask and shift
Date: Mon, 03 Sep 2001 19:26:00 -0000	[thread overview]
Message-ID: <20010904022602.27235.qmail@sourceware.cygnus.com> (raw)

The following reply was made to PR c/4214; it has been noted by GNATS.

From: Alan Modra <amodra@bigpond.net.au>
To: Kevin Ryde <user42@zip.com.au>, mark@codesourcery.com
Cc: gcc-gnats@gcc.gnu.org, David Edelsohn <dje@watson.ibm.com>
Subject: Re: c/4214: powerpc64: wrong code from optimized mask and shift
Date: Tue, 4 Sep 2001 11:51:06 +0930

 On Tue, Sep 04, 2001 at 09:39:45AM +1000, Kevin Ryde wrote:
 > 
 > A certain mask and shift combination produces a wrong answer when
 > compiled with optimization.
 > 
 > >How-To-Repeat:
 > A program foo.c,
 > 
 >         int n = 3;
 > 
 >         int
 >         main (void)
 >         {
 >           printf ("%d\n", (n & 2) << 1);
 >           return 0;
 >         }
 
 Fixed by http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01493.html ,
 which I applied to mainline.
 
 Is the patch OK for the branch Mark?  You could argue that it contains
 optimisations (extra patterns for rldicr, no bit-shifting loops) as well
 as the bugfix for rldic, but I'm far more likely to make an error if I
 try to split the patch rather than apply the lot.  ;-)
 
 Alan
 


             reply	other threads:[~2001-09-03 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-03 19:26 Alan Modra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-24 14:52 dje
2001-09-03 20:06 Mark Mitchell
2001-09-03 16:46 Kevin Ryde

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=20010904022602.27235.qmail@sourceware.cygnus.com \
    --to=amodra@bigpond.net.au \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /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).