Estimated hours taken: 2
Branches: main, release
Fix a bug reported by Michael Day. The bug was that when frameopt wanted
to find out whether a block of instructions referred to stack variables,
it did not look past pragma_c_code LLDS instructions. As a result, the
generated code included a (redundant) assignment to a stack variable
in a section of code that, after frameopt, did not have a stack frame
anymore. It therefore overwrote part of its caller's stack frame, which
caused a crash.
compiler/opt_util.m:
Fix the auxiliary predicate used by frameopt.
tests/hard_coded/prince_frameopt.{m,exp}:
tests/hard_coded/prince_frameopt_css.m:
tests/hard_coded/prince_frameopt_css.style.m:
The new test case (a three module program).
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
Enable the new test case, and compile it with the options required
to show the bug if it exists.