// S : tags error c min $TAGS // S : expect --result error --location-comment ERROR // S : cc -o test.bc -Os $CC_OPT $file // S : verify --liveness $V_OPT test.bc #include #include #include int next( int state ) { switch ( state ) { case -1: return 0; case 0: return 1; case 1: __vm_ctl_flag( 0, _VM_CF_Accepting ); return 2; case 2: return 3; case 3: return 4; case 4: return 5; case 5: return 6; case 6: __vm_ctl_flag( 0, _VM_CF_Accepting ); return 3; /* ERROR */ } return 0; } int main() { int state = -1, oldstate; while ( true ) { oldstate = 0; __dios_reschedule(); oldstate = state; state = next( state ); __dios_trace_f( "state: %d -> %d", oldstate, state ); } }