Package: gnat
Version: 4.4+1
Severity: minor
Here is an example. All works correctly when removing "I with" from
body, so this bug will not be blocking for users.
I suppose the code is legal (4.3.2(10) "If the ancestor_part is a
subtype_mark, then its type can be abstract.").
-- Source
package Example is
type I is interface;
type R is new I with null record;
function F return R;
end Example;
package body Example is
function F return R is
begin
return (I with null record);
end F;
end Example;
-- GCC command and output
gcc-4.4 -c example.adb
+===========================GNAT BUG DETECTED==============================+
| 4.4.3 (x86_64-pc-linux-gnu) Assert_Failure atree.adb:884 |
| Error detected at example.adb:5:14 |
Versions of packages gnat depends on:
ii gnat-4.4 4.4.3-1 The GNU Ada compiler
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]