microsoft / Armada

Armada is a tool for writing, and proving correct, high-performance concurrent programs.
Other
137 stars 19 forks source link

Problem with C generation #32

Closed MadeByMars closed 2 years ago

MadeByMars commented 3 years ago

I found problems with C++ generation in Armada. First, Test/qbss_benchmark/queue.patch is out of date. // namespace _9_SharedStructs should be replaced with // namespace _12_SharedStructs.

Besides, I got queue.c:93:3: error: implicit declaration of function 'LFDS711_PAL_ASSERT' is invalid in C99 [-Werror,-Wimplicit-function-declaration]. Does it rely on the platform or the version of gcc?

Also, I found that there is a potential bug in Compiler.cs/CreateLvalue(Expression lhs, TargetWriter wr). With the following code:

*(errors_ptr + i) := 0;

CreateLvalue couldn't handle BinaryExpr(+), and got an exception.