#include <perms.h>

                                                                //      1  ! trivial example to show the problem
                                                                //      2  
                                                                //      3  %externalroutine my write(%integer n, p)
#line 3 "regression-bugs-tmp/overload.imp"
void MYWRITE( int N, int P )
#line 3 "regression-bugs-tmp/overload.imp"
{
                                                                //      4    ! first capture the perms version
                                                                //      5    write(n, p)
#line 5 "regression-bugs-tmp/overload.imp"
_imp_WRITE(N, P);
                                                                //      6  %end
#line 6 "regression-bugs-tmp/overload.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block MYWRITE at level 1
                                                                //      7  
                                                                //      8  %externalroutine write(%integer n, p)
#line 8 "regression-bugs-tmp/overload.imp"
void WRITE( int N, int P )
#line 8 "regression-bugs-tmp/overload.imp"
{
                                                                //      9    print string("Result is ")
#line 9 "regression-bugs-tmp/overload.imp"
_imp_PRINTSTRING(_imp_str_literal("Result is "));
                                                                //     10    my write(n, p)
#line 10 "regression-bugs-tmp/overload.imp"
MYWRITE(N, P);
                                                                //     11    newline
#line 11 "regression-bugs-tmp/overload.imp"
_imp_NEWLINE();
                                                                //     12  %end
#line 12 "regression-bugs-tmp/overload.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block WRITE at level 1
                                                                //     13  
                                                                //     14  %begin
#line 14 "regression-bugs-tmp/overload.imp"
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //     15    write(123, 0)
#line 15 "regression-bugs-tmp/overload.imp"
WRITE(123, 0);
                                                                //     16  %endofprogram
#line 16 "regression-bugs-tmp/overload.imp"
/* Remove %on %event handler here if present for this block */
return 0;
} // End of block _imp_main at level 1
#line 16 "regression-bugs-tmp/overload.imp"
// End of file
