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

--- Comment #7 from Andrew Teylu <andrew.teylu at vector dot com> ---
Yeah, so my reduced file no longer crashes if you use `-fgnat-encodings=all`.

Re-reducing Tom's original files while `-fgnat-encodings=all` still gives a
crash:

```
package LOCAL_IO is
   function GET_NEXT return Integer;
end LOCAL_IO;
package body LOCAL_IO is
   type TEXT_TYPE (LENGTH : Positive := 2) is record
      null;
   end record;
   DESCRIPTORS : array (1 .. 0) of TEXT_TYPE;
   function GET_NEXT return Integer is
   begin
      return 1;
   end GET_NEXT;
end LOCAL_IO;
```

Steps:

```
gnatchop -w input.txt
gnat-x86_64-windows64-15.1.0-2/bin/gcc.exe -g -c local_io.adb # no error
gnat-x86_64-windows64-15.1.0-2/bin/gcc.exe -g -gcodeview -fgnat-encodings=all
-c local_io.adb
```

Where the last gives:

```
+===========================GNAT BUG DETECTED==============================+
| 15.1.0 (x86_64-w64-mingw32) in AT_unsigned, at dwarf2out.cc:4572         |
| Error detected around local_io.adb:10:1                                  |
| Compiling local_io.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.                                       |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

local_io.adb
local_io.ads


raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:422
```

Reply via email to