[Bug ada/123138] [15/16 Regression] ICE when comparing reduction expression with integer constant
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 15 23:38:40 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123138
--- Comment #4 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:043ed7e185958510067698be29a549dff30fe326
commit r15-10604-g043ed7e185958510067698be29a549dff30fe326
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Dec 16 00:34:31 2025 +0100
Ada: Fix ICE when comparing reduction expression with integer constant
This a regression present on the mainline, 15 and 14 branches: the compiler
aborts on the comparison of the result of a reduction expression, whose
prefix is an aggregate, and an integer constant, because of a type mismatch
created by the resolution of the reduction expression, which unduly forces
Integer on the reduction expression.
gcc/ada/
PR ada/123138
* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Reduce>:
Override a universal numeric type only if the prefix is not an
aggregate.
gcc/testsuite/
* gnat.dg/reduce4.adb: New test.
* gnat.dg/reduce5.adb: Likewise.
More information about the Gcc-bugs
mailing list