This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/32181] Legal program executes incorrectly, RM 3.4(27)



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]