I've analyzed code generated to save and restore local variables in transactional sections and wrote some tests with very much local variables (exceeding the capacity of the CPU registers). At some point the compiler segfaulted. I've attached the code to allow you to further investigate it. /usr/bin/g++-4.7 -fgnu-tm -Wall -g -O3 -o gnutm-test compiler-segfaults.c -litm
Nothing is attached.
Created attachment 31224 [details] Test case to reproduce the bug
Confirmed...works in mainline. Anyone care to bisect this and see which patch fixed the problem?
FWIW, also works on 4.8.
Created attachment 33098 [details] reduced testcase
This bug seems to be the same as this one: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52173 Maybe the patch can be backported to 4.7 (hopefully without breaking anything?).
4.7 branch is already closed.
Should be fixed.