https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123138
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:e1eca9a8f580943d4d38a311e37eb41b5c997086 commit r16-6147-ge1eca9a8f580943d4d38a311e37eb41b5c997086 Author: Eric Botcazou <[email protected]> Date: Tue Dec 16 00:23:56 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 expression. gcc/ada/ PR ada/123138 * sem_attr.adb (Resolve_Attribute) <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.
