[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
Wed Jun 10 07:04:45 GMT 2026


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

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

https://gcc.gnu.org/g:aa8d539b67218c4ad4bb171c789269c6092110b5

commit r15-11269-gaa8d539b67218c4ad4bb171c789269c6092110b5
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