mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
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.