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

            Bug ID: 124923
           Summary: crash with -gnateV on private tagged types
           Product: gcc
           Version: 15.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liam at liampwll dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

The attached program crashes gcc with the below bug box:

| 16.0.1 20260418 (experimental) (x86_64-pc-linux-gnu) Program_Error
sem_ch4.adb:6177 explicit raise|
| Error detected at gpr2-source_reference-text_value.ads:6:24
[gpr2-source_reference-value.ads:4:4]|
| Compiling gpr2-source_reference-value.ads                                |

Compile with gcc -c -gnateV gpr2-source_reference-value.ads on 15, 16, and
probably older compilers to reproduce the error.

This looks like it's probably PR ada/123857 showing up again except this time
not in code written by me. In Text_Values you can replace Is_Defined with the
following to produce the same error without -gnateV:

   overriding function Is_Defined (Self : Object) return Boolean is
     (Self'Valid_Scalars);

Reply via email to