https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88576

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #13 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #11)
> (In reply to Florian Weimer from comment #6)
> > Has this got to do anything with errno?  It seems to me that with
> > -fno-math-errno, GCC assumes that malloc does not set *any* TLS variable. 
> > That doesn't look right to me.
> 
> GCC assumes that memory allocation does not affect global heap state.
> That's correct unless you compile the memory allocator itself.
> 
> Note the original "alias" with -fno-math-errno was probably too lazy but
> allocations being a barrier for any load/store of global memory is quite
> bad for optimization in _fortran_ (which has no business with errno)
> where we (unfortunately) also get everything passed by reference.
> 
> I'll introduce -f[no-]alloc-errno, defaulted to the -f[no-]math-errno
> state and enabled at -Ofast (but not with -ffast-math).

Darwin has -fno-math-errno set by default, but its malloc can set errno (to
ENOMEM), so it wouldn't make sense to have -fno-alloc-errno set by
-fno-math-errno on Darwin

Reply via email to