[Bug target/59343] miscompiled for loop in sh4 target (-Os)
gcc-bugzilla-f5d8 at theblacksun dot eu
gcc-bugzilla@gcc.gnu.org
Mon Dec 2 13:02:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59343
gcc-bugzilla-f5d8 at theblacksun dot eu changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |sh4-unknown-linux-gnu
--- Comment #4 from gcc-bugzilla-f5d8 at theblacksun dot eu ---
Using the second testcase the compiler also misbehaves:
$ sh4-unknown-linux-gnu-g++ -Wall -Wextra -static -o testcase2_O2 -O2
testcase2.cpp
$ sh4-unknown-linux-gnu-g++ -Wall -Wextra -static -o testcase2_O1 -O1
testcase2.cpp
$ sh4-unknown-linux-gnu-g++ -Wall -Wextra -static -o testcase2_O0 -O0
testcase2.cpp
$ sh4-unknown-linux-gnu-g++ -Wall -Wextra -static -o testcase2_Os -Os
testcase2.cpp
$ qemu-sh4 ./testcase2_00
flag1 is true... flag2?: 0
$ qemu-sh4 ./testcase2_01
flag1 is true... flag2?: 0
flag2 is true
$ qemu-sh4 ./testcase2_02
flag1 is true... flag2?: 0
flag2 is true
$ qemu-sh4 ./testcase2_0s
flag1 is true... flag2?: 0
flag2 is true
More information about the Gcc-bugs
mailing list