gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) seems to miscopile isl with -O2
AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
AX_GCC_ARCHFLAG($acx_maxopt_portable)
AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
AX_GCC_ARCHFLAG($acx_maxopt_portable)
+
+ # drop to -O1 for gcc 4.2
+ $CC --version |
+ sed -e 's/.* \(@<:@0-9@:>@@<:@0-9@:>@*\)\.\(@<:@0-9@:>@@<:@0-9@:>@*\).*/\1 \2/' |
+ (read major minor
+ if test $major -eq 4 -a $minor -eq 2; then
+ exit 0
+ fi
+ exit 1
+ ) && CFLAGS="-O1"