vnmakarov / mir

A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
MIT License
2.29k stars 145 forks source link

Issue 361 test case failed #375

Closed IIvm closed 10 months ago

IIvm commented 10 months ago

Build on Mac M2, in bbv branch, here is output:

./c-tests/new/issue361.c:./c-tests/new/issue361.c:13:13: incompatible types in assignment to an arithmetic type lvalue
vnmakarov commented 10 months ago

Sorry for delay with the answer.

The test case should be run only on x86-64. It assigns va_list value to integer. On aarch64 va_list is a structure when on x86 it is a pointer. Therefore the test works fine on x86-64 and fails on aarch64.

I fixed this with https://github.com/vnmakarov/mir/commit/81a57292b8a6463d1430353ac9efa912ea8e2587

IIvm commented 10 months ago

That's wonderful! I appreciate your explanation. Thank you!