diff options
author | Tristan Gingold | 2015-09-02 18:25:59 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-09-02 18:25:59 +0200 |
commit | 26af2bf1ad5f949e05d0e3ac560bbd22e41d7158 (patch) | |
tree | f6cb5bd691edb9fb30f720b854f35d10fcb718d0 /src | |
parent | 510ff8938793c0cc883bdf2a5f5adfdd95f77880 (diff) | |
download | ghdl-26af2bf1ad5f949e05d0e3ac560bbd22e41d7158.tar.gz ghdl-26af2bf1ad5f949e05d0e3ac560bbd22e41d7158.tar.bz2 ghdl-26af2bf1ad5f949e05d0e3ac560bbd22e41d7158.zip |
mcode: fix alignment of structure (thinko).
Diffstat (limited to 'src')
-rw-r--r-- | src/ortho/mcode/ortho_code-types.adb | 2 | ||||
-rw-r--r-- | src/ortho/oread/ortho_front.adb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ortho/mcode/ortho_code-types.adb b/src/ortho/mcode/ortho_code-types.adb index e0c070c..e5893aa 100644 --- a/src/ortho/mcode/ortho_code-types.adb +++ b/src/ortho/mcode/ortho_code-types.adb @@ -621,9 +621,9 @@ package body Ortho_Code.Types is (Elements : in out O_Element_List; Res : out O_Tnode) is begin + Tnodes.Table (Elements.Res).Align := Elements.Align; Tnodes.Table (Elements.Res).Size := Do_Align (Elements.Off, Elements.Res); - Tnodes.Table (Elements.Res).Align := Elements.Align; Tnodes.Table (Elements.Res + 1) := To_Tnode_Common (Tnode_Record'(Fields => Elements.First_Field, Nbr_Fields => Elements.Nbr)); diff --git a/src/ortho/oread/ortho_front.adb b/src/ortho/oread/ortho_front.adb index abb5fda..75cc96a 100644 --- a/src/ortho/oread/ortho_front.adb +++ b/src/ortho/oread/ortho_front.adb @@ -1040,6 +1040,9 @@ package body Ortho_Front is begin Next_Token; Base_Node := Parse_Type; + if Base_Node.Kind /= Type_Array then + Parse_Error ("subarray base type is not an array type"); + end if; Expect (Tok_Left_Brack); Next_Token; Res_Type := New_Constrained_Array_Type |