http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55513
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-07 05:21:01 UTC --- (In reply to comment #8) > /* Allow any built-in function; if the expansion > isn't constant, we'll deal with that then. */ > && !is_builtin_fn (fun)) The problem seems to be in the dealing with it "then"; cxx_eval_builtin_function_call needs to actually check whether folding the call produces a constant or not.