While trying to build muon (https://github.com/muon-build/muon) with cproc I ran into an error when QBE is invoked. I'm not sure if this issue is a problem with cproc or QBE. Here are the steps to reproduce
git clone https://github.com/muon-build/muon
cd muon
mkdir build
cd build
cproc -DMUON_BOOTSTRAPPED -I . -I .. -I ../include -I subprojects/tinyjson -I ../subprojects/tinyjson -I src/script -DMUON_PLATFORM_posix -DMUON_ENDIAN=0 -o analyze.c.o -c ../src/lang/analyze.c
This produces the following error:
qbe:-:7102: ssa temporary %.294 is used undefined in @for_join.337
cproc: codegen: process 21147 exited with status 1
cproc: compile: process signaled: Terminated
cproc: assemble: process signaled: Terminated
Thanks!
This error indicates that the code had some read of a variable before it was initialized. While I think qbe should accept this, it usually indicates some sort of bug in the code. Here, it was due to some unused variable warning suppressions
(void)key
, prior to their initialization.This is fixed in muon 0.4.0.