Files
mercury/tests/hard_coded/no_inline.m
Zoltan Somogyi 56819ab405 Use our own random number generator, since the output of random.m
Estimated hours taken: 0.8

tests/hard_coded/space.{m,out}:
	Use our own random number generator, since the output of random.m
	depends on the wordsize of the machine.

tests/hard_coded/no_inline.{m,out}:
	Use a more direct test of whether the C code is inlined or not.
1998-08-12 04:05:07 +00:00

34 lines
408 B
Mathematica

:- module no_inline.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module list.
main -->
{
bar(A),
bar(B),
bar(C),
bar(D)
},
io__write([A, B, C, D]),
io__write_string("\n").
:- pragma no_inline(bar/1).
:- pred bar(int::out) is det.
:- pragma c_code(bar(Value::out), "
{
static int counter = 0;
Value = counter++;
}
").