Fix/work around PR57676, LRA terminates prematurely
Richard Biener
richard.guenther@gmail.com
Mon Feb 22 14:34:00 GMT 2016
On Fri, Feb 19, 2016 at 10:34 PM, Jeff Law <law@redhat.com> wrote:
> On 02/19/2016 02:32 PM, Bernd Schmidt wrote:
>>
>> The testcase in this PR causes gcc to abort with
>>
>> internal compiler error: Maximum number of LRA constraint passes is
>> achieved (30)
>>
>> [in theory - I've not managed to reproduce this on my system with any
>> compiler]
>>
>> The abort is premature, allowing LRA to continue would allow the
>> testcase to compile. Vlad would like to leave the check in, however, as
>> it is a good way to catch problems with machine descriptions as they are
>> converted to use LRA.
>>
>> The following is a compromise I came up with after some internal
>> discussion. The idea is to leave the assert in under -fchecking, so that
>> release compilers do not prematurely abort for valid testcases, while
>> development builds get an additional sanity check.
>>
>> Bootstrapped and tested on x86_64-linux. Ok?
>>
>>
>> Bernd
>>
>> PR rtl-optimization/57676
>> * lra-assigns.c (lra_assign): Guard test for maximum iterations
>> with flag_checking.
>>
>> PR rtl-optimization/57676
>> * gcc.dg/torture/pr57676.c: New test.
>
> OK. Your call on backporting the release branches.
Hum, but then you get to "inifinite" compiles again when LRA is buggy
or the user presents it with an impossible to handle asm.
I don't think that's a good idea - maybe bumping the limit is the way to
go instead?
30 constraint passes sounds excessive and a sign of a bug to me anyway.
Richard.
> jeff
More information about the Gcc-patches
mailing list