mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 03:43:51 +00:00
Branches: main Fix problems with the verification of indirect structure reuse calls. In many cases, a call to a procedure would be converted into reuse call even though an input argument shares memory with another variable that is live after the call. As the test cases show, this even happened for trivial programs. compiler/ctgc.livedata.m: compiler/structure_reuse.domain.m: compiler/structure_sharing.domain.m: Reimplement `nodes_are_not_live' which is used to verify that datastructures which should be dead for a reuse call really are dead. I didn't understand how the original was supposed to work so I made up my own version which may or may not have any relation to the theory. compiler/structure_reuse.indirect.m: When verifying an indirect reuse call site, don't project live data down to those about the callee arguments. The call to `nodes_are_not_live' now depends on this. tests/hard_coded/Mercury.options: tests/hard_coded/Mmakefile: tests/hard_coded/bad_indirect_reuse.exp: tests/hard_coded/bad_indirect_reuse.m: tests/hard_coded/bad_indirect_reuse2.exp: tests/hard_coded/bad_indirect_reuse2.m: tests/hard_coded/bad_indirect_reuse3.exp: tests/hard_coded/bad_indirect_reuse3.m: Add test cases. Switch off `--common-struct' as it tends to mask the problem.
2 lines
27 B
Plaintext
2 lines
27 B
Plaintext
{foo(42, 43), foo(42, 43)}
|