This should give an error message that m is declared twice:
definit_X(m:i32, n: i32, b: CPtr, m: i32) ->None:
B: Pointer[i16[m*n]] =c_p_pointer(b, i16[m*n])
i: i32j: i32foriinrange(m):
forjinrange(n):
B[i*n+j] =i16((i+j) %m)
Clang gives the following error message on the generated code:
/Users/ondrej/repos/gsi/copperhead/benchmarks/matmul/build/mat_vec-host-generated.c:224:52: error: redefinition of parameter 'm'void init_X(int32_t m, int32_t n, void* b, int32_t m) ^/Users/ondrej/repos/gsi/copperhead/benchmarks/matmul/build/mat_vec-host-generated.c:224:21: note: previous declaration is herevoid init_X(int32_t m, int32_t n, void* b, int32_t m) ^
We should give a similar error message, underlying both declarations of m.
This should give an error message that
mis declared twice:Clang gives the following error message on the generated code:
We should give a similar error message, underlying both declarations of
m.