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

Andrew Teylu <andrew.teylu at vector dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.teylu at vector dot com

--- Comment #3 from Andrew Teylu <andrew.teylu at vector dot com> ---
I reduced Tom's example to:

```
package LOCAL_IO is
   function GET_NEXT (str : String) return String;
end LOCAL_IO;
package body LOCAL_IO is
   function GET_NEXT (str : String) return String is
   begin
      return str;
   end GET_NEXT;
end LOCAL_IO;
```

To check:

```
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 -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:6: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
```

What's interesting is `local_io.adb:6:1` is the start of the last line in the
file (the error is always at the last line, irrespective of what's in the
file).

Reply via email to