Red Hat Bugzilla – Bug 16557
mawk-1.3.3-4 miscompiled by gcc-2.96-52
Last modified: 2008-05-01 11:37:57 EDT
mawk-1.3.3-4 compiled by gcc-2.96-52 dumps core:
# mawk -f firstversions.awk mm
zsh: 5431 segmentation fault mawk -f firstversions.awk mm
firstversions.awk and mm can be found at:
array.c in mawk 1.3.3-4 is miscompiled by -O2. -O seems ok.
Using -O2 -fno-strength-reduce on array.c generates a working mawk.
BTW, gcc 2.96 20000819 still miscompiles mawk.
Jakub is fixing this problem in gcc. Thanks for your report.
a workaround was made in mawk as well.