Files
mercury/tests/hard_coded/no_warn_singleton.m
Peter Ross 7cd1380351 Test that intermodule optimization works when clauses are
Estimated hours taken: 0.25
Branches: main

tests/hard_coded/intermod_pragma_clause.exp:
tests/hard_coded/intermod_pragma_clause.m:
tests/hard_coded/intermod_pragma_clause_sub.m:
	Test that intermodule optimization works when clauses are
	defined as both a foreign proc and a mercury clause.
2002-06-11 10:13:57 +00:00

26 lines
468 B
Mathematica

% A regression test to ensure that we don't get warnings about the variables
% _IO0 and _IO occuring more than once.
:- module no_warn_singleton.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main -->
f(X),
io__write_int(X),
io__nl.
:- pred f(int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C", f(X::out, _IO0::di, _IO::uo),
[will_not_call_mercury, promise_pure], "
X = 5;
").
f(5) --> [].