public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58092] New: BEQ (Branch on equal) jumps to wrong address (executes conditional code!)
@ 2013-08-06 12:06 zajec5 at gmail dot com
  2013-08-06 12:08 ` [Bug c/58092] " zajec5 at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zajec5 at gmail dot com @ 2013-08-06 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58092
           Summary: BEQ (Branch on equal) jumps to wrong address (executes
                    conditional code!)
           Product: gcc
           Version: 4.6.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zajec5 at gmail dot com

Created attachment 30617
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30617&action=edit
Minimal test case (ANSI C)

In my code I'm using simple if (rev == 0x4) to make a conditional write.
Unfortunately when using mipsel gcc with "-Os" the code from conditional part
is *partially* executed even when "rev" doesn't equal 4.

> mipsel-openwrt-linux-uclibc-gcc -v
Reading specs from
/home/zajec/openwrt/openwrt.git/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib64/gcc/mipsel-openwrt-linux-uclibc/4.6.4/specs
COLLECT_GCC=mipsel-openwrt-linux-uclibc-gcc
COLLECT_LTO_WRAPPER=/home/zajec/openwrt/openwrt.git/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.4/lto-wrapper
Target: mipsel-openwrt-linux-uclibc
Configured with:
/home/zajec/openwrt/openwrt.git/build_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.12/configure
--with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt/Linaro GCC
4.6-2012.12 r36315'
--prefix=/home/zajec/openwrt/openwrt.git/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2
--build=x86_64-suse-linux --host=x86_64-suse-linux
--target=mipsel-openwrt-linux-uclibc --with-gnu-ld --enable-target-optspace
--disable-libgomp --disable-libmudflap --disable-multilib --disable-nls
--with-host-libstdcxx=-lstdc++ --with-float=soft
--with-gmp=/home/zajec/openwrt/openwrt.git/staging_dir/host
--with-mpfr=/home/zajec/openwrt/openwrt.git/staging_dir/host
--disable-decimal-float --with-mips-plt
--with-mpc=/home/zajec/openwrt/openwrt.git/staging_dir/host --disable-libssp
--disable-__cxa_atexit
--with-headers=/home/zajec/openwrt/openwrt.git/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/include
--enable-languages=c,c++ --enable-shared --enable-threads
--with-slibdir=/home/zajec/openwrt/openwrt.git/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib
--enable-lto --with-libelf=/home/zajec/openwrt/openwrt.git/staging_dir/host
Thread model: posix
gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36315)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-08-07 13:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 12:06 [Bug c/58092] New: BEQ (Branch on equal) jumps to wrong address (executes conditional code!) zajec5 at gmail dot com
2013-08-06 12:08 ` [Bug c/58092] " zajec5 at gmail dot com
2013-08-06 12:17 ` zajec5 at gmail dot com
2013-08-06 12:51 ` mikpe at it dot uu.se
2013-08-06 14:43 ` zajec5 at gmail dot com
2013-08-06 16:42 ` mikpe at it dot uu.se
2013-08-06 21:28 ` [Bug target/58092] " zajec5 at gmail dot com
2013-08-07  9:58 ` zajec5 at gmail dot com
2013-08-07 10:41 ` zajec5 at gmail dot com
2013-08-07 10:42 ` zajec5 at gmail dot com
2013-08-07 13:51 ` zajec5 at gmail dot com

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).