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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-09-14
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #30 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Are volatile accesses able to raise traps that we can unwind from?  Thus
> should they all be subject to -fnon-call-exception support?  What's the
> situation with Ada here?

The Ada standard does not really care about potentially trapping memory
accesses (for example, if you specify an address for an object and you cannot
access the memory at this address, the execution is erroneous, end of the
game).

But GNAT goes beyond the standard by catching signals for memory faults and
raising the Storage_Error exception in response, which can then be locally
caught. That's indeed done by means of -fnon-call-exceptions, which creates EH
edges for all potentially trapping memory accesses in the middle-end sense. 
Given that accesses to volatile objects are almost always potentially trapping
in this sense in practice, that's already good enough.

Reply via email to