tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Estimated hours taken: 6 (mostly in tracking down the problem)
Branches: main
Work around Mantis bug 160. The bug arises because gcc mishandles this
code sequence:
r1 = mkword(tag, base);
r2 = tag(r1);
In this case, we know r2 == tag, but gcc screws up the optimization.
compiler/peephole.m:
Add a peephole optimization pattern that replaces the second assignment
above with r2 = tag. This should help avoid tickling the gcc bug.
compiler/options.m:
Add a developer-only option, --no-optimize-peep-mkword, that disables
the new pattern. The intention is that we can use this to check whether
gcc has fixed the bug.
compiler/optimize.m:
Get the value of the new option to peephole.m.
compiler/tag_switch.m:
Fix some misleading comments that mmc generated for the bug test case
file.
tests/hard_coded/bug160.{m,exp}:
The test case for this bug.
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
Enable the test case.