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/16087] New: Legal program rejected, RM 7.3(13)


-- RM 7.3(13)
-- If the ancestor subtype of a private extension has constrained
-- discriminants, then the parent subtype of the full view shall
-- impose a statically matching constraint on those discriminants.
package Test_248173 is
   type T1(b: boolean) is tagged null record;
   type T2 is new T1(b => false) with private;
private
   F: constant boolean := false;
   type T2 is new T1(b => F) with null record;  -- OK
end Test_248173;


test_248173.ads:10:27: constraint not conformant to previous declaration
gnatmake: "test_248173.ads" compilation error

-- 
           Summary: Legal program rejected, RM 7.3(13)
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ludovic dot brenta at insalien dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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