[Bug tree-optimization/89536] New: wrong code at -Os and above on x86_64-linux-gnu
su at cs dot ucdavis.edu
gcc-bugzilla@gcc.gnu.org
Thu Feb 28 14:14:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89536
Bug ID: 89536
Summary: wrong code at -Os and above on x86_64-linux-gnu
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
Target Milestone: ---
This appears to be a recent regression.
$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 9.0.1 20190228 (experimental) [trunk revision 269278] (GCC)
$
$ gcctk -O1 small.c; ./a.out
$
$ gcctk -Os small.c
$ ./a.out
Aborted (core dumped)
$
-----------------------------
int a = 1;
int main ()
{
a = ~(a && 1);
if (a < -1)
a = ~a;
if (!a)
__builtin_abort ();
return 0;
}
More information about the Gcc-bugs
mailing list