[m-rev.] for review: add a workaround for Mantis bug #492
Julien Fischer
jfischer at opturion.com
Thu Jan 16 22:27:33 AEDT 2020
On Thu, 16 Jan 2020, Peter Wang wrote:
> On Thu, 16 Jan 2020 18:58:55 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
>>
>> For review by anyone.
>>
>> Branches: master, 20.01
>>
>> --------------------------
>>
>> Add a workaround for Mantis bug #492.
>>
>> In debug grades that use global register variables, the generated C code is
>> triggering an internal error in GCC 9 on x86_64 machines. Force GCC to compile
>> at -O0 in this case as that seems to be the only workaround for the issue.
>>
>> scripts/mgnuc.in:
>> Force GCC to use -O0 in the above case.
>>
>> compiler/compile_target_code.m:
>> Do the same when GCC is invoked directly by the Mercury compiler.
>>
>> Re-arrange some of the code that applies C compiler bug workarounds
>> to make this possible.
>>
>> Add an XXX about an overly broad bug workaround on darwin; I'll look
>> into that separately.
...
> The bug is supposed to be fixed but the fix didn't make it into
> gcc 9.2, so maybe limit the workaround to gcc 9.1 and gcc 9.2.
Done.
> I'll try verify a gcc snapshot tomorrow.
Thanks.
Julien.
More information about the reviews
mailing list