[Bug ada/125695] Big_Exp special case for (+/-)2 ** K is broken for -2 and even K

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 9 18:54:01 GMT 2026


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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:8247ea5bb5b425746d1860e08aa8d823e3cb2500

commit r17-1456-g8247ea5bb5b425746d1860e08aa8d823e3cb2500
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Jun 9 20:51:09 2026 +0200

    Ada: Fix couple of oversights in Big_Integer package

    Having too many special cases can be counter-productive as shown here.

    gcc/ada/
            PR ada/125695
            * libgnat/s-genbig.adb ("**"): Do not drop the sign on the floor.
            (Big_Exp): Take into account the parity of the exponent for -2.

    gcc/testsuite/
            * gnat.dg/bigint1.adb: New  test.


More information about the Gcc-bugs mailing list