Skip to content

Commit 49c04ba

Browse files
committed
Derived type declarations must be registered
Derived type declarations must be registered in the symbol table even if they are a derivation of a private type.
1 parent a10a654 commit 49c04ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gnat2goto/driver/tree_walk.adb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,9 +1487,11 @@ package body Tree_Walk is
14871487
-- (via `Register_Type_Declaration') when its
14881488
-- private or incomplete_type_declaration was processed.
14891489
-- If it has no private declaration or the Incomplete_View is not
1490-
-- present then the full_type_declaration has to be registered
1490+
-- present or it is a derived_type_definition
1491+
-- then the full_type_declaration has to be registered
14911492
if not (Has_Private_Declaration (E)
14921493
or else Present (Incomplete_View (N)))
1494+
or else Nkind (Type_Definition (N)) = N_Derived_Type_Definition
14931495
then
14941496
Do_Type_Declaration (New_Type, E);
14951497

0 commit comments

Comments
 (0)