This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/15843] New: Illegal program not detected, RM 3.7.2(2)
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2004 10:18:41 -0000
- Subject: [Bug ada/15843] New: Illegal program not detected, RM 3.7.2(2)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
-- RM 3.7.2(2)
-- For a prefix A that is of a discriminated type ...
-- the following attribute [A'constrained] is defined
procedure Test_247017 is
generic
type T1 (<>) is private;
procedure p1(x: out T1);
procedure p1 (x: out T1) is
b: boolean := x'constrained; --ERROR: not a discriminated type
begin
null;
end p1;
begin
null;
end Test_247017;
I expect an error message like this:
test_247017.adb:11:20: "x" has no discriminants, Constraint attribute not defined
But the compiler says nothing.
--
Summary: Illegal program not detected, RM 3.7.2(2)
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=15843