------- Comment #2 from joel at gcc dot gnu dot org 2007-10-17 21:12 ------- I have tried this code with the following gcc versions:
WORKS 3.2.3: -O2 FAILS 4.1.1: -O2 FAILS 4.2.1: -O2 FAILS 4.2.2: -O2 WORKS 4.2.1: -O0 WORKS 4.2.2: -O0 WORKS 4.1.1: -O0 This is a regression from the 3.x compiler and an optimization bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33803