[m-rev.] trivial diff: fix test case failure
Simon Taylor
stayl at cs.mu.OZ.AU
Fri Dec 7 15:00:06 AEDT 2001
Estimated hours taken: 0.1
Branches: main
tests/hard_coded/no_inline.m:
Mark a predicate implemented using impure C code as impure
to avoid duplicate call elimination.
Index: no_inline.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/no_inline.m,v
retrieving revision 1.3
diff -u -u -r1.3 no_inline.m
--- no_inline.m 12 Aug 1998 04:04:59 -0000 1.3
+++ no_inline.m 7 Dec 2001 03:56:15 -0000
@@ -11,18 +11,19 @@
:- import_module list.
+:- pragma promise_pure(main/2).
main -->
{
- bar(A),
- bar(B),
- bar(C),
- bar(D)
+ impure bar(A),
+ impure bar(B),
+ impure bar(C),
+ impure bar(D)
},
io__write([A, B, C, D]),
io__write_string("\n").
:- pragma no_inline(bar/1).
-:- pred bar(int::out) is det.
+:- impure pred bar(int::out) is det.
:- pragma c_code(bar(Value::out), "
{
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list