Open dtarditi opened 1 month ago
Hi David,
I cloned this repo's branch 17-init-main
and tried running the 3C tests. I am only getting two tests which are failing. Can you post the commit on which you got the above results? Also, it looked like this repo is missing a change to the CMakeLists.txt from the 17-init-main
branch of the archived fork. So I used the archive during my building. Please let me know if I should be building differently.
Hi Sourag,
Thanks for pointing out there was an issue with the checkedc repo. It didn't have the 17-init-main branch from the archive. I have pushed that branch to the checkedc repo. I merged the most recent changes from main into the 17-init-main branch also.
For the 3C tests, I did a debug build on x64 Windows. I used this cmake command
:
cmake -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug c:\checkedc\checkedc-clang\llvm
followed by
ninja checked-clang
It could be the type of build or that platform that is causing the difference. Note that running checked-clang
with a debug build is quite slow. It takes over an hour on my test system.
With this PR, there are 6 failing 3C test cases:
I debugged
3C/prototype_success2.c
, which is oddly compiled when you run the3C\prototype_success1.c
test. The 3C failure is due to trying to get a source location for a compiler-generated variable declaration. The test case that triggers the failures shows the problem:In the prototype declaration, only the types of the arguments are declared. The compiler generates a variable declaration. When 3C tries to fetch the source code location, an assert happens.
Here's a partial call stack. This is on Windows using the VS Studio debugger: