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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Chris Johns from comment #2)
> Thanks for the quick response. The clean trap instruction did confuse me.
> 
> I suppose my work around to move the code into another file stops gcc
> detecting the access. Is this true ?
> 
> I am happy to build our code with the check enabled because accessing 0 is
> something we trap for with MMU targets such as ARM and PowerPC.

It looks like it is just the startup code in the Init5235 function which needs
this extra option, you can use the #pragma's too.
Code like:
        *((short *)(0x00000000)) = 0;

Will produce the trap.

Reply via email to