This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/32181] Legal program executes incorrectly, RM 3.4(27)
- From: "ludovic at ludovic-brenta dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Apr 2008 23:47:23 -0000
- Subject: [Bug ada/32181] Legal program executes incorrectly, RM 3.4(27)
- References: <bug-32181-286@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ludovic at ludovic-brenta dot org 2008-04-23 23:47 -------
Exactly. The quoted portion of the ARM says that Pak2.Eq (Z1, Z2) should
implicitly convert Z1 and Z2 to type T1, then call Pak1.Eq, then return True.
Instead, it returns False as though GNAT synthesised a new
function Eq (X, Y : T2) return Boolean renames "=";
inside of Pak2, where "=" is the predefined equality operator for T2. This
synthetic function overrides Pak1.Eq without the programmer's consent.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32181