]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix internal error on ill-formed Reduce attribute in Ada 2022
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 30 Sep 2025 09:55:18 +0000 (11:55 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 30 Sep 2025 09:58:54 +0000 (11:58 +0200)
commit3d62068b69f5148450a0881a4ded7d0eae46d3c9
tree71d18f28a8d6067ed6a181baad6a396354e8315b
parent796d70db703d90731bb805352d287c786b7e2061
Ada: Fix internal error on ill-formed Reduce attribute in Ada 2022

This is an internal error on the new Reduce attribute of Ada 2022 when the
programmer swaps its arguments(!)  The change makes it so that the compiler
gives an error message instead.

gcc/ada/
PR ada/117517
* sem_attr.adb (Resolve_Attribute) <Attribute_Reduce>: Try to
resolve the reducer first.  Fix casing of error message.

gcc/testsuite/
* gnat.dg/reduce1.adb: New test.
gcc/ada/sem_attr.adb
gcc/testsuite/gnat.dg/reduce1.adb [new file with mode: 0644]