[m-dev.] trivial diff: fix tests/hard_coded/no_inline.m

Simon Taylor stayl at cs.mu.OZ.AU
Wed Aug 12 12:57:28 AEST 1998


> 
> G'day all.
> 
> Simon Taylor wrote:
> 
> > tests/hard_coded/no_inline.m:
> > 	Add explicit `will_not_call_mercury's. Otherwise weird things happen.
> 
> What kind of weird things?
 
The will_not_call_mercury in that test case is a lie - the pragma c_code
exits using a tailcall() and a proceed(), rather than falling through. If the
C code is marked may_call_mercury, a stack frame is created to save the
succip, but the stack frame is not removed on exit. The result is that
the stuff after the call to the C code is executed multiple times.

Zoltan is coming up with a slightly cleaner test case.

Simon.



More information about the developers mailing list