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.