#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_initialise(argc, argv);
// 2 ! This is a particularly nasty test as the i2c output depends on the --tidy flag.
// 3 ! - MONOP precedences are not compared properly against BINOP precedences.
// 4 ! Note: imp2026 gets it right.
// 5
// 6 %integer i
int I;
// 7
// 8 i = -1 >> 1 ;! This imp construct actually should evaluate as: -(1>>1) which is 0! Yes, it's documented.
I = -((unsigned int)1 >> 1);
// 9
// 10 write(i, 3) ; newline
_imp_WRITE(I, 3);
_imp_NEWLINE();
// 11
// 12 i = (-1) >> 1 ;! unsigned shift should pull in 0's at the top, returning MAX INT.
I = (unsigned int)(-1) >> 1;
// 13
// 14 write(i, 3) ; newline
_imp_WRITE(I, 3);
_imp_NEWLINE();
// 15
// 16 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}