public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/114593] New: Failed type conversion on non-tagged derived type inside a generic unit
@ 2024-04-04 20:13 jhb.chat at gmail dot com
  2024-04-06 16:05 ` [Bug ada/114593] [11/12/13/14 regression] bogus error on type conversion in instantiation of child unit inside generic child unit ebotcazou at gcc dot gnu.org
  2024-04-14  5:23 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jhb.chat at gmail dot com @ 2024-04-04 20:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114593
           Summary: Failed type conversion on non-tagged derived type
                    inside a generic unit
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jhb.chat at gmail dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57880
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57880&action=edit
use gnatchop on file to get all example files separated

When converting from a System.Address type to a new type derived off of
System.Address inside a generic, the compiler fails with:

core-first-third.ads:6:04: error: instantiation error at
core-first-second.ads:15
core-first-third.ads:6:04: error: invalid conversion, not compatible with
private type "System.Address"

Doing the same in a basic example without generics involved compiles fine.

GCC version info:
gcc version 13.2.0 (Rev3, Built by MSYS2 project)

Platform is msys2 on Windows 10 home (up to date on all patches).

I also tested on godbolt and it fails starting with version 11.1 up to trunk as
of today.  Last working version was 10.5

Example shows both a working type conversion in example.adb and a failed
compile example using generics.  Simply commenting out the line 'with
Core.First.Third;` in example.adb will allow the program to compile as it
removes the generics.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/114593] [11/12/13/14 regression] bogus error on type conversion in instantiation of child unit inside generic child unit
  2024-04-04 20:13 [Bug ada/114593] New: Failed type conversion on non-tagged derived type inside a generic unit jhb.chat at gmail dot com
@ 2024-04-06 16:05 ` ebotcazou at gcc dot gnu.org
  2024-04-14  5:23 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-04-06 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-04-06
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|Failed type conversion on   |[11/12/13/14 regression]
                   |non-tagged derived type     |bogus error on type
                   |inside a generic unit       |conversion in instantiation
                   |                            |of child unit inside
                   |                            |generic child unit
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Confirmed, the compiler is probably a bit lost here...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ada/114593] [11/12/13/14 regression] bogus error on type conversion in instantiation of child unit inside generic child unit
  2024-04-04 20:13 [Bug ada/114593] New: Failed type conversion on non-tagged derived type inside a generic unit jhb.chat at gmail dot com
  2024-04-06 16:05 ` [Bug ada/114593] [11/12/13/14 regression] bogus error on type conversion in instantiation of child unit inside generic child unit ebotcazou at gcc dot gnu.org
@ 2024-04-14  5:23 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-14  5:23 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-14  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 20:13 [Bug ada/114593] New: Failed type conversion on non-tagged derived type inside a generic unit jhb.chat at gmail dot com
2024-04-06 16:05 ` [Bug ada/114593] [11/12/13/14 regression] bogus error on type conversion in instantiation of child unit inside generic child unit ebotcazou at gcc dot gnu.org
2024-04-14  5:23 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).