#416979 Illegal program not detected, RM 7.3(13), 4.9.1(1), nonstatic discriminants

Package:
gnat-12
Source:
gcc-12
Description:
GNU Ada compiler
Submitter:
Date:
2022-04-04 05:33:29 UTC
Severity:
normal
Tags:
#416979#5
Date:
2007-03-31 21:57:44 UTC
From:
To:
In the program below, the full views (in the private part) of T2 and
T3 are both illegal because the value of the discriminant, x2, is not
static.  RM 7.3(13) states that the parent subtype of T2 and T3
(i.e. T1) must impose a statically matching constraint on the
discriminant, i.e. x1.  RM 4.9.1(1) states that a "statically matching
constraint" requires the value to be static.  Note that x3, despite
being a constant, is nonstatic because its value depends on x2 which
is nonstatic.

#416979#14
Date:
2009-01-02 19:50:51 UTC
From:
To:
found 306835 4.3.2-2
found 416975 4.3.2-2
found 416979 4.3.2-2
found 427107 4.3.2-2
found 427108 4.3.2-2
thanks