# try to crash the co statement

resource cokiller()
    int  a = -3
    int  b = -4
    op p1(int arg1, int arg2, int arg3, int arg4)  # prints third argument
    op p2(int a, int b) returns int sum            # returns sum of arguments
    op p3(int a)                                   # prints argument
    op p4(int a)                                   # prints -1000 + argument

	int x = -1, y = -2, z = -3
	for [ i = 1 to 5 ] {
	    int  ii = 1000 * i
	    co call p1(a,b,ii,y) ->
		write(-4)
	    // z = p2(-1,-4) ->
		write(z)                # -5
		co call p3(2 * ii) ->
		    co call p3(3 * ii) ->
			write (-6)
		    // [ j= 10 to 13] call p4(4 * ii + j) ->
			write(-7)
		    // call p1(-100, -101, 5 * ii, -103) ->
			write(-8)
		    oc
		//  a = p2(y,x) ->
			write(-9)
		oc
	    oc
	}

    proc p1 (arg1, arg2, arg3, arg4)  {
	write(arg3)
    }

    proc p2(a,b) returns sum  {
	sum = a + b
    }

    proc p3 (a)  {
	write(a)
    }

    proc p4(a)  {
	write(-1000 + a)
    }
end
