I found following bug in GNAT 14.3 when trying to query a record’s 'Object_Size at compile time. Using this example:
procedure Test is
type Rec is record
A : Integer;
end record;
pragma Compile_Time_Error (Rec'Object_Size /= 32, "WRONG SIZE");
begin
null;
end Test;
GNAT 14.3 (current default in Debian stable/testing) fails with this error:
test.adb:6:47: error: condition is not known at compile time
Problem is not present in neither GNAT 15.3/16.1.
Is this a known issue? If not, should I report it? Is GNAT 14.x still supported?
EDIT: it seems the issue is not limited to records, it also fails with (at least) the following types:
type T is null record;
type T is new String (1..10);
type T is array (1..1) of Integer;
So, it seems it’s a problem with “compound” types (??)