https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69447
Bug ID: 69447
Summary: [5/6 Regression] wrong code with -O2
-fno-schedule-insns and mixed 8/16/32/64bit
arithmetics @ armv7a
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: armv7a-*-linux-gnueabi
Created attachment 37445
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37445&action=edit
reduced testcase
Output:
$ armv7a-hardfloat-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-armv7a-hardfloat/bin/armv7a-hardfloat-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-232760-checking-yes-rtl-df-nographite-armv7a-hardfloat/bin/../libexec/gcc/armv7a-hardfloat-linux-gnueabi/6.0.0/lto-wrapper
Target: armv7a-hardfloat-linux-gnueabi
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-checking=yes,rtl,df --without-cloog --without-ppl --without-isl
--with-float=hard --with-arch=armv7-a --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=armv7a-hardfloat-linux-gnueabi
--with-ld=/usr/bin/armv7a-hardfloat-linux-gnueabi-ld
--with-as=/usr/bin/armv7a-hardfloat-linux-gnueabi-as
--with-sysroot=/usr/armv7a-hardfloat-linux-gnueabi --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-232760-checking-yes-rtl-df-nographite-armv7a-hardfloat
Thread model: posix
gcc version 6.0.0 20160123 (experimental) (GCC)
$ armv7a-hardfloat-linux-gnueabi-gcc testcase.c -O2 -fno-schedule-insns
$ qemu-arm ./a.out
7739
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
The expected output is "7737".
The .optimized dump is the same as when compiled without -fno-schedule-insns.
Tested revisions:
trunk r232760 - FAIL
5-branch r232545 - FAIL
4_9-branch r232544 - OK
4_8-branch r224828 - OK