http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60092
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Andreas Schwab from comment #11) > If a function is not allowed to change errno this must be explicitly > documented. That means Index: gcc/tree-ssa-alias.c =================================================================== --- gcc/tree-ssa-alias.c.orig 2014-02-06 15:43:42.138266256 +0100 +++ gcc/tree-ssa-alias.c 2014-02-06 15:43:33.046266882 +0100 @@ -1847,7 +1847,9 @@ call_may_clobber_ref_p_1 (gimple call, a ao_ref dref; ao_ref_init_from_ptr_and_size (&dref, ptrptr, TYPE_SIZE_UNIT (ptr_type_node)); - return refs_may_alias_p_1 (&dref, ref, false); + return (refs_may_alias_p_1 (&dref, ref, false) + || (flag_errno_math + && targetm.ref_may_alias_errno (ref))); } /* Freeing memory kills the pointed-to memory. More importantly the call has to serve as a barrier for moving loads and stores is necessary.