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