http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48412
--- Comment #4 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2011-04-04 10:50:57 UTC --- reduced testcase .... aborts at -O1, goes fine at -O0. Thanks for implementing the warning, without this, it would have been very difficult to find. INTEGER FUNCTION S1(m,ma,lx) INTEGER :: m,ma,lx IF (((m < 0).AND.(MODULO(ABS(ma-lx),2) == 1)).OR.& ((m > 0).AND.(MODULO(ABS(ma-lx),2) == 0))) THEN S1=1 ELSE S1=0 ENDIF END FUNCTION INTEGER :: s1 IF (S1(1,2,1).NE.0) CALL ABORT() END