This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Could someone tell me what is wrong here?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]