public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rwgk at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/28003]  New: optimizer bug
Date: Mon, 12 Jun 2006 19:28:00 -0000	[thread overview]
Message-ID: <bug-28003-3137@http.gcc.gnu.org/bugzilla/> (raw)

I will attach a small reproducer.

/* Reproducer for optimizer bug in gcc svn trunk revision 114570
   (as checked out 2006_06_12_0834 PDT)

   To produce correct output:
     g++ -Wall -O0 gcc_trunk_2006_06_12_0834_fc5_x86_64.cpp
     ./a.out

   To see the bug:
     g++ -Wall -O1 gcc_trunk_2006_06_12_0834_fc5_x86_64.cpp
     ./a.out

   Note the difference in the last line of the output:
       Correct: 1 0 0
     Incorrect: 0 0 0

   The output is also incorrect for -O2 and -O3.

   The last line of the output is correct if compiled with:
     g++ -Wall -O1 -DBAD_WORKAROUND gcc_trunk_2006_06_12_0834_fc5_x86_64.cpp
     ./a.out

   Platform:
     Fedora Core release 5 (Bordeaux)
     Linux rosie.lbl.gov 2.6.15-1.2054_FC5 #1 SMP Tue Mar 14 15:48:20 EST 2006
x
86_64 x86_64 x86_64 GNU/Linux

     % g++ -v
     Using built-in specs.
     Target: x86_64-unknown-linux-gnu
     Configured with: /net/rosie/scratch1/rwgk/gcc_trunk/configure
--prefix=/usr
/local_cci/gcc_trunk_2006_06_12_0834_fc5_x86_64 --enable-languages=c,c++
     Thread model: posix
     gcc version 4.2.0 20060612 (experimental)
 */


-- 
           Summary: optimizer bug
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rwgk at yahoo dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


             reply	other threads:[~2006-06-12 19:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 19:28 rwgk at yahoo dot com [this message]
2006-06-12 19:43 ` [Bug c++/28003] " rwgk at yahoo dot com
2006-06-13  6:26 ` [Bug tree-optimization/28003] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-06-13 13:29   ` Daniel Berlin
2006-06-13 13:29 ` reichelt at gcc dot gnu dot org
2006-06-13 13:59 ` dberlin at dberlin dot org
2006-06-13 14:40 ` pinskia at gcc dot gnu dot org
2006-06-13 17:24 ` dberlin at gcc dot gnu dot org
2006-06-29 21:35 ` pinskia at gcc dot gnu dot org
2006-07-05 18:01 ` mmitchel at gcc dot gnu dot org
2006-07-20 21:29 ` steven at gcc dot gnu dot org
2006-07-21 10:18 ` reichelt at gcc dot gnu dot org
2006-08-08 15:51 ` janis at gcc dot gnu dot org
2006-08-09 14:40 ` dberlin at gcc dot gnu dot org
2006-08-21  2:17 ` dberlin at gcc dot gnu dot org
2006-08-22 14:04 ` dberlin at gcc dot gnu dot org
2006-08-22 14:05 ` dberlin at gcc dot gnu dot org
2006-08-22 14:05 ` dberlin at gcc dot gnu dot 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-28003-3137@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).