O3 works, the only problematic flag is loop SSE'izations (-ftree-vectorize).