https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120665

            Bug ID: 120665
           Summary: assertion failure on container Aggregate aspect
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dennis at przytarski dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

This code

pragma Ada_2022;
procedure Example is
  type A is null record
    with Aggregate => (Empty => Empty, Add_Named => Add_Named);
  function Empty return A is ([]);
  procedure Add_Named (this : in out A; k: Integer; v : Integer) is null;
begin
   null;
end Example;

fails with

gnatmake: "<source>" compilation error
+===========================GNAT BUG DETECTED==============================+
| 16.0.0 20250615 (experimental) (x86_64-linux-gnu) Assert_Failure failed
precondition from einfo-entities.ads:218|
| Error detected at example.adb:5:31                                       |
| Compiling <source>                                               |
...

Reply via email to