https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117517
Bug ID: 117517 Summary: Reduce attribute creates bug Product: gcc Version: 14.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: 00120260a at gmail dot com CC: dkm at gcc dot gnu.org Target Milestone: --- +===========================GNAT BUG DETECTED==============================+ | 14.2.0 (x86_64-pc-linux-gnu) Program_Error sem_eval.adb:4636 explicit raise| | Error detected at main.adb:5:38 | | Compiling main.adb | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ file, from gnatmake main.adb (faulty line : "B: Positive := A'Reduce(1,Positive'Max);") pragma Ada_2022; procedure main is type ArrayInput is array (Positive range <>) of Positive; A: arrayinput := (2,87); B: Positive := A'Reduce(1,Positive'Max); begin null; end main; I've had a LOT of issues related to reduction expression and also iterated component associations.