------- Comment #5 from hjl at lucon dot org 2007-08-07 14:40 ------- There is a disconnect between middle-end and back-end. There are many places in builtins.c with
/* If argument is already integer valued, and we don't need to worry about setting errno, there's no need to perform rounding. */ if (! flag_errno_math && integer_valued_real_p (arg)) However, the x86 back-end doesn't have this info: (define_expand "lround<SSEMODEF:mode><SSEMODEI24:mode>2" [(match_operand:SSEMODEI24 0 "nonimmediate_operand" "") (match_operand:SSEMODEF 1 "register_operand" "")] "SSE_FLOAT_MODE_P (<SSEMODEF:MODE>mode) && TARGET_SSE_MATH && ((<SSEMODEI24:MODE>mode != DImode) || TARGET_64BIT) && !flag_trapping_math && !flag_rounding_math && !optimize_size" { ix86_expand_lround (operand0, operand1); DONE; }) That is why it fails to expand. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33007