diff options
author | Tristan Gingold | 2015-09-02 18:25:25 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-09-02 18:25:25 +0200 |
commit | 510ff8938793c0cc883bdf2a5f5adfdd95f77880 (patch) | |
tree | f222f11ad129f907a127474855313fafa974c9af /src/vhdl/sem_expr.adb | |
parent | 5bd3c2ccf36ce92257616c709460b0006f4f1f7f (diff) | |
download | ghdl-510ff8938793c0cc883bdf2a5f5adfdd95f77880.tar.gz ghdl-510ff8938793c0cc883bdf2a5f5adfdd95f77880.tar.bz2 ghdl-510ff8938793c0cc883bdf2a5f5adfdd95f77880.zip |
Translate: explicitly clean transient types.
Diffstat (limited to 'src/vhdl/sem_expr.adb')
-rw-r--r-- | src/vhdl/sem_expr.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index 1cab4d1..ec796b9 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -3640,7 +3640,9 @@ package body Sem_Expr is Check_Read (Arg); Set_Expression (Expr, Arg); Arg_Type := Get_Type (Arg); + when Iir_Kind_Allocator_By_Subtype => + -- Analyze subtype indication. Arg := Get_Subtype_Indication (Expr); Arg := Sem_Types.Sem_Subtype_Indication (Arg); Set_Subtype_Indication (Expr, Arg); @@ -3648,6 +3650,10 @@ package body Sem_Expr is if Arg = Null_Iir or else Is_Error (Arg) then return Null_Iir; end if; + if Is_Anonymous_Type_Definition (Arg) then + Set_Allocator_Subtype (Expr, Get_Subtype_Indication (Expr)); + end if; + -- LRM93 7.3.6 -- If an allocator includes a subtype indication and if the -- type of the object created is an array type, then the |