public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/57343] wrong code on x86_64-linux at -Os and above
Date: Mon, 20 May 2013 22:55:00 -0000	[thread overview]
Message-ID: <bug-57343-4-mxvOsrxWNn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57343-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57343

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
          Component|rtl-optimization            |tree-optimization

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Reduced a bit:

int printf (const char *, ...);
int c = 0;

int main ()
{
  int i;
  int f = 1;
  for (i = 0; i < 5; i++)
  {
    --c;
    unsigned char h = c * 100;
    if (h == 0)
    {
      f = 0;
      break;
    }
  }

  printf ("%d\n", f);

  return 0;
}

-O1 is enough. Disabling cunroll seems to help.


       reply	other threads:[~2013-05-20 22:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-57343-4@http.gcc.gnu.org/bugzilla/>
2013-05-20 22:55 ` glisse at gcc dot gnu.org [this message]
2013-05-21  6:23 ` [Bug tree-optimization/57343] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-05-21  9:54 ` rguenth at gcc dot gnu.org
2013-05-21 11:54 ` rguenth at gcc dot gnu.org
2013-05-21 12:19 ` rguenth at gcc dot gnu.org
2013-05-21 14:41 ` rakdver at gcc dot gnu.org
2013-05-27  7:55 ` rguenther at suse dot de
2013-05-27  9:01 ` rguenth at gcc dot gnu.org
2013-05-27 13:03 ` [Bug tree-optimization/57343] [4.8 " rguenth at gcc dot gnu.org
2013-08-29 13:09 ` jakub at gcc dot gnu.org
2013-08-29 13:17 ` jakub at gcc dot gnu.org

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=bug-57343-4-mxvOsrxWNn@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).