Hi, The fortran front-end calls annotate_all_with_locus with a statement list which included coumpound statement which was generated by fold and annotate_all_with_locus does not like the compound expression at all. The compound expression was generated when fold was folding COND_EXPR and decided it needed to keep around the SAVE_EXPR (which is correct). Since we really don't need to generate a compound expression here, I changed omit_one_operand and pedantic_omit_one_operand for this case to just return a cast to void type of the ommited expression. I also had to fix up gfortran.fortran-torture/compile to run through all the options instead of just -O. OK? Bootstrapped and tested on i686-apple-darwin8.10 with no regressions. Thanks, Andrew Pinski ChangeLog: * fold-const.c (omit_one_operand): Return only the ommitted expression if the result is an empty statement. (pedantic_omit_one_operand): Likewise. * gfortran.fortran-torture/compile/emptyif-1.f90: New test. * lib/fortran-torture.exp (fortran-torture): Use TORTURE_OPTIONS instead of just -O.