[Bug tree-optimization/69399] [5/6 Regression] wrong code with -O and int128 (due to ccp?)

2016-01-21 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69399

--- Comment #2 from Zdenek Sojka  ---
(In reply to H.J. Lu from comment #1)
> It works fine with x32 on trunk:
> 
> [hjl@gnu-6 gcc]$ ./xgcc -B./ -O /tmp/x.c
> [hjl@gnu-6 gcc]$ ./a.out 
> [hjl@gnu-6 gcc]$ file ./a.out 
> ./a.out: ELF 32-bit LSB executable, x86-64, version 1 (SYSV), dynamically
> linked, interpreter /libx32/ld-linux-x32.so.2, for GNU/Linux 3.4.0,
> BuildID[sha1]=d7fda1eccd8a9d4b9a9eb05c83ea7306f5fe1709, not stripped
> [hjl@gnu-6 gcc]$

In trunk, this seems to happen only when crosscompiling:

(native x86_64 compiler with -mx32)
$ x86-64-pc-linux-gnu-gcc testcase.c -S -O -mx32
...
foo:
movl$0, %eax
ret
...

but (crosscompiler to x32):
$ x86-64-pc-linux-gnux32-gcc testcase.c -S -O
...
foo:
movl$-127, %eax
ret
...

Native x32 gcc-5.3.0 fails: (native x86_64 fails as well)
# gcc-5.3.0 -O testcase.c
# ./a.out 
Aborted

[Bug tree-optimization/69399] [5/6 Regression] wrong code with -O and int128 (due to ccp?)

2016-01-20 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69399

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-01-20
 CC||hjl.tools at gmail dot com
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
It works fine with x32 on trunk:

[hjl@gnu-6 gcc]$ ./xgcc -B./ -O /tmp/x.c
[hjl@gnu-6 gcc]$ ./a.out 
[hjl@gnu-6 gcc]$ file ./a.out 
./a.out: ELF 32-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /libx32/ld-linux-x32.so.2, for GNU/Linux 3.4.0,
BuildID[sha1]=d7fda1eccd8a9d4b9a9eb05c83ea7306f5fe1709, not stripped
[hjl@gnu-6 gcc]$