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/34507] Bug box, Assert_Failure einfo.adb:814 on illegal Ada 2005 program



------- Comment #1 from ludovic at ludovic-brenta dot org  2007-12-17 09:30 -------
The initial test case was incorrect regarding the lines marked "ERROR".
Here's a corrected version:

package pak1 is
   type T1(<>) is tagged limited private;
private
   type T1(D: integer) is tagged limited null record;
end pak1;

with pak1;
package pak2 is
   type T2 is new pak1.T1 with null record;   -- legal
   x1: T2 := (pak1.T1 with null record);      -- ERROR, but accepted
end pak2;

package pak1.pak3 is
   type T3 is new pak1.T1 with null record;   -- legal, but rejected
   x2: T3 := (pak1.T1 with null record);      -- legal, but rejected
end pak1.pak3;

So in fact, Pak1.Pak3 also triggers a bug, albeit a different one from Pak2. 
I'll file it separately.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34507


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