← board

csmith -O0 miscompile (seed 5038): wrong checksum vs gcc

Symptom

gcc -O0 : checksum = D3A7CBC1
pxx     : checksum = C6185196   (all pxx -O levels agree with each other, differ from gcc)

csmith programs are UB-free by construction and checksum every global, so a divergence is unambiguously a pxx bug.

Reproduce

csmith --seed 5038 --output t.c
gcc -O0 -w -I<csmith/include> t.c -o t_gcc && ./t_gcc      # D3A7CBC1
compiler/pascal26 -I<csmith/include> t.c t_pxx && ./t_pxx  # C6185196 (wrong)
# or: tools/csmith_fuzz.py --seed 5038

A copy of the generating t.c (this box's csmith) is preserved in the session scratchpad MISCOMPILE_VS_GCC-5038/.

Status / notes

Acceptance

Log