[m-rev.] diff: fix failure of test/trailing/tu_test2
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu Jan 7 10:42:40 AEDT 2010
Fix the failure of tests/trailing/tu_test2 in low-level C grades.
This test checks that trail usage optimisation is correctly removing trail
operations from around semidet conditions in if-the-elses.
It is failing because inlining is simplifying away the if-then-else.
(Differences in the way the HLDS is transformed for the high-level
C backend means that it is working for that.)
tests/trailing/tu_test2.m:
Add a no_inline pragma in order to avoid the above problem.
Julien.
Index: tests/trailing/tu_test2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/trailing/tu_test2.m,v
retrieving revision 1.1
diff -u -r1.1 tu_test2.m
--- tests/trailing/tu_test2.m 6 Sep 2006 04:02:57 -0000 1.1
+++ tests/trailing/tu_test2.m 6 Jan 2010 23:11:55 -0000
@@ -32,6 +32,7 @@
io.format("X = %d\n", [i(X)], !IO).
:- pragma promise_pure(test/2).
+:- pragma no_inline(test/2).
:- pred test(int::in, int::out) is det.
test(X, Y) :-
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list