]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Convert floating-point zero to machine representation
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 20 Feb 2025 18:25:02 +0000 (19:25 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 6 Jun 2025 08:37:07 +0000 (10:37 +0200)
commit032e2209fff5573ee018fb78ed4c238c5fac4226
tree1580a2c7b95b8a7e1112274ecc8677d2b1483df0
parenta90094505584cae5d3c813bf955b194d60785e87
ada: Convert floating-point zero to machine representation

When statically evaluating floating-point expressions we convert the final
result to machine number. However, we skipped this conversion if the result was
zero.

This inconsistency was introduced when adding a warning for compile-time
evaluation that gives different result from a run-time evaluation, but left
when this warning was deconstructed. It causes a crash in GNATprove, which
expects all floating-point numbers in the GNAT AST to be in a machine
representation form.

gcc/ada/ChangeLog:

* sem_eval.adb (Check_Non_Static_Context): Remove special handling of
floating-point zero.
gcc/ada/sem_eval.adb