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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gnat bug box when comparing |[13/14 regression] internal
                   |access to subtype with      |error on anonymous access
                   |access inside record        |type equality
   Last reconfirmed|                            |2024-01-08
                 CC|                            |ebotcazou at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The record is actually irrelevant, this only comes from the designated types:

package P is
   subtype I is Integer;
   A : access I;

   Acc : access Integer;

   function F return Boolean is (A = Acc);
end P;

eric@fomalhaut:~/build/gcc/native> ~/install/gcc/bin/gcc -c p.ads 
+===========================GNAT BUG DETECTED==============================+
| 14.0.0 20240108 (experimental) [master r14-6995-g4d31d660620]
(x86_64-suse-linux) GCC error:|
| in build_binary_op, at ada/gcc-interface/utils2.cc:1147                  |
| Error detected at p.ads:7:38 

This worked up to GCC 12.

Reply via email to