Bug 16087 - Legal program rejected, RM 7.3(13)
Summary: Legal program rejected, RM 7.3(13)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 4.4.0
Assignee: Samuel Tardieu
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2004-06-19 15:04 UTC by Ludovic Brenta
Modified: 2008-05-13 22:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.0.0
Last reconfirmed: 2008-05-07 14:03:04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludovic Brenta 2004-06-19 15:04:58 UTC
-- 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
Comment 1 Andrew Pinski 2004-10-29 14:44:59 UTC
Confirmed.
Comment 2 Samuel Tardieu 2008-05-12 21:06:58 UTC
This has been fixed in SVN trunk (135230).