[Bug target/54723] test gcc.target/arm/div64-unwinding.c fails for GNU/Linux target

janis at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 12 19:28:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54723

Janis Johnson <janis at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Janis Johnson <janis at gcc dot gnu.org> 2012-10-12 19:27:49 UTC ---
I'm declaring this Not a Bug based on this response from Richard Earnshaw in
<http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00966.html>:

I don't believe there's a bug here.   The ARM EABI defines __aeabi_idiv0 
as a hook that will be called if division by zero occurs.  While the 
default implementation simply raises SIGFPE on linux, it is perfectly 
possible to provide your own definition of this hook and then throw() a 
C++ exception.  In order to do that you'd need unwind information in the 
divdi implementation ([u]divsi tailcalls the hook).

Technically you could argue the same for bare metal, but in that case 
the arguments against the code bloat outweigh this very small corner 
case and users wanting this will have to rebuild their support code.

On linux, I think the presence of the unwind information is correct, 
since the code bloat problem is very much a secondary concern.



More information about the Gcc-bugs mailing list