'Ensure that macro expansion works for more than one block (issue #872)'

def test_issue_872(self):

    @cuda.jit('void(float64[:,:])')
    def macros_in_multiple_blocks(ary):
        for i in range(2):
            tx = cuda.threadIdx.x
        for j in range(3):
            ty = cuda.threadIdx.y
        sm = cuda.shared.array((2, 3), float64)
        sm[(tx, ty)] = 1.0
        ary[(tx, ty)] = sm[(tx, ty)]
    a = np.zeros((2, 3))
    macros_in_multiple_blocks[(1, (2, 3))](a)
