This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/69399] [5/6 Regression] wrong code with -O and int128 (due to ccp?)
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 11:02:56 +0000
- Subject: [Bug tree-optimization/69399] [5/6 Regression] wrong code with -O and int128 (due to ccp?)
- Auto-submitted: auto-generated
- References: <bug-69399-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69399
--- Comment #2 from Zdenek Sojka <zsojka at seznam dot cz> ---
(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