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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(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).

Reply via email to