This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/48181] [4.8/4.9 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
- From: "bernhard.kaindl at thalesgroup dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Jun 2015 00:49:08 +0000
- Subject: [Bug rtl-optimization/48181] [4.8/4.9 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0
- Auto-submitted: auto-generated
- References: <bug-48181-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181
Bernhard Kaindl <bernhard.kaindl at thalesgroup dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernhard.kaindl@thalesgroup
| |.com
--- Comment #11 from Bernhard Kaindl <bernhard.kaindl at thalesgroup dot com> ---
Checked what Steven Bosscher said in comment #5 and what I understood from
Comment 6 that LRA fixed this issue:
> FWIW I can't reproduce the problem with trunk. I see rcx being saved
> and restored around the calls, e.g.:
>
> movq %rcx, (%rsp)
> call bar
> movq (%rsp), %rcx
>
> and likewise around the second memcpy. Unfortunately (an old) valgrind
> on gcc17 doesn't work with with "valgrind -q ./a.out" as in comment #0.
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192719
> fixed this (so, most likely reproduceable by disabling LRA).
Indeed, gcc-4.8.4 and gcc-4.9.2 save and restore rcx as described,
valgrind-3.10.1 (current release) does not show an error,
and program does not crash at all.
So affected are only gcc-4.5, 4.6 and 4.7,
and only with --param ira-max-conflict-table-size=0 & -fgcse active.