https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69476
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-01-26
CC| |ebotcazou at gcc dot gnu.org
Summary|Fail to reconize types with |accept size clause for
|an unrejected static size |2-level discriminated
|attribute as compile time |record types with fixed
|known size type |sizes
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The measure used to evaluate the minimality of the testcase is far from being
trivial because the following testcase trounces it if a simple character count
is used:
package P is
type Rec1 (D : Boolean) is record
B : Boolean;
end record;
type Rec2 (D : Boolean) is record
R : Rec1 (D);
end record;
for Rec2'Size use 24;
end P;
p.ads:10:04: size clause not allowed for variable length type
This has always been rejected historically by GNAT. The clause is confirming
so this ought to be accepted.