For now lots of the extended assembly code generated don't work as gcc. Sometimes chibicc generates different result than gcc for the same extended assembly code. Sometimes it fails with segmentation fault because some values are hard-coded like the first variable offset and 3 cases found but not the reason of that :
case 1 : the first variable starts at offset -12(%rbp).
case 2 : the first variable starts at offset -24(%rbp).
case 3: the first variable starts at offset -16(%rbp).
Need to check if we can handle differently and need to study ABI convention or other compiler to know how they manage extended assembly.
For now lots of the extended assembly code generated don't work as gcc. Sometimes chibicc generates different result than gcc for the same extended assembly code. Sometimes it fails with segmentation fault because some values are hard-coded like the first variable offset and 3 cases found but not the reason of that : case 1 : the first variable starts at offset -12(%rbp). case 2 : the first variable starts at offset -24(%rbp). case 3: the first variable starts at offset -16(%rbp). Need to check if we can handle differently and need to study ABI convention or other compiler to know how they manage extended assembly.