015-char-arith.c (415B)
1 // tests/cc-parse/15-char-arith.c — width-correct char load/store via 2 // real C source. 3 // 4 // Two adjacent unsigned-char locals at consecutive 1-byte frame slots. 5 // If cg uses 8-byte loads/stores on byte-typed lvals, b's store 6 // contaminates a's slot and the equality check fails. Width-aware 7 // emission yields exit 1. 8 9 int main() { 10 unsigned char a = 170; 11 unsigned char b = 187; 12 return a == 170; 13 }