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

            Bug ID: 114964
           Summary: Ada Address_To_Access_Conversions gnat_to_gnu_entity
                    internal error
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ken at pegasoft dot ca
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Sharing a report from SparForte programming language users.  I've been unable
to duplicate as I'm on GCC 10.

The parser_pen.adb package has been unchanged for many years.  First reported
failing in GCC 13.2.0 in August 2023, but still being reported.  Recently seen
also in Raspberry Pi Bookworm and Red Hat Fedora.

OpenGL statements in the form of:

  param_ptr := GL_Double_Array_Conv.To_Address( theArray.gl_da );

where

  package GL_Double_Array_Conv is new
     system.address_to_access_conversions( double_array );

and

  type double_array is array( size_t range <> ) of aliased GLdouble;

where GLdouble is an Interfaces.C.double

and

  param_ptr   : GL_Double_Array_Ptr;

which is a renaming of System.Address.

Such lines are failing with

+===========================GNAT BUG DETECTED==============================+
| 13.2.0 (x86_64-raven-freebsd13) GCC error:                               |
| in gnat_to_gnu_entity, at ada/gcc-interface/decl.cc:475                  |
| Error detected at parser_pen.adb:4017:61                                 |
| Compiling parser_pen.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.                                       |
+==========================================================================+

SparForte is built with 

gnatmake -j2 -c -i -O1 -march=athlon64 -we -gnat12 -gnatfaoN -gnatVaep
-gnateEeEeF -fstack-protector -c $(INCLUDE) spar

Users have been unable to workaround except to delete the offending lines.

SparForte is located at https://github.com/kburtch/SparForte

I will provide more information as it becomes available to me.

If this has been resolved, please advise on a workaround, if one exists, for
the users.

This is my first bug report.  Please excuse any mistakes in etiquette.
Thank you.
Ken B.

Reply via email to