This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46693] incorrect code generation with -O2 optimization enabled
- From: "geomatsi at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 28 Nov 2010 16:12:49 +0000
- Subject: [Bug c/46693] incorrect code generation with -O2 optimization enabled
- Auto-submitted: auto-generated
- References: <bug-46693-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46693
--- Comment #5 from Sergey Matyukevich <geomatsi at gmail dot com> 2010-11-28 16:12:47 UTC ---
I am using an arm gcc cross-toolchain created with OpenEmbedded. Toolchain
version and its dumpspecs are available in attachements. Wrong code for
attached simple testcase is generated when I use -O2 optimization option. When
optimization options are not used or when -O0 is in use then code is generated
correctly. Running testcase is straightforward: compile an example with -O2 and
without it, then run both examples (either on a suitable arm machine or under
qemu) and get two different outputs (OK and WRONG) for two binaries.