public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Máté Soós" <soos.mate@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Could someone tell me what is wrong here?
Date: Wed, 19 Jan 2011 21:15:00 -0000	[thread overview]
Message-ID: <AANLkTi=364akvQSnXRX0ovo7jRqD_QBuyjNxvA-UfQdi@mail.gmail.com> (raw)

Dear All,

I maintain a program and I seemed to have stumbled into some bug of
either the program or gcc. Thanks to Vegard Nossum, we have a really
small (101 lines, most of them empty) example to reproduce it. The bug
appears when I compile the program with gcc 4.5.1 (I believe it
appears for 4.5.0 and 4.5.2 as well), with -O2. The program is meant
to print "success", but when compiled with -O2 it returns "failure",
while for -O0 works fine. The file is available here:

http://planete.inrialpes.fr/~soos/gcc/

as "Main.cpp" and "compile.sh".

Machine it is compiled on:
distribution: Fedora Core 14
gcc --version: gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
uname -a: Linux localhost.localdomain 2.6.35.6-45.fc14.i686 #1 SMP Mon
Oct 18 23:56:17 UTC 2010 i686 i686 i386 GNU/Linux

This bug seemed to have been triggered in the original (>13'000 LOC)
program by multiple people, using multiple 4.5.X versions, on
different computers&distributions.

Does anyone know why I get this bug? Could anyone confirm that this
the bug triggers on their architecture, distribution, and compiler
version (only >= 4.5.0 seems to be affected)?

Thank you in advance,

Mate

--
Mate Soos
Security Research Labs
www.srlabs.de
www.msoos.org

             reply	other threads:[~2011-01-19 21:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 21:15 Máté Soós [this message]
2011-01-19 21:22 ` Brian Budge
2011-01-19 21:54   ` Jonathan Wakely
2011-01-19 22:02     ` Brian Budge
2011-01-19 22:39       ` Zdeněk Sojka
2011-01-19 22:54         ` Brian Budge
2011-01-19 22:57           ` Mate Soos
2011-01-19 21:53 ` Jonathan Wakely

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='AANLkTi=364akvQSnXRX0ovo7jRqD_QBuyjNxvA-UfQdi@mail.gmail.com' \
    --to=soos.mate@gmail.com \
    --cc=gcc-help@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).