diff options
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 e0c070c27..e5893aa08 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 abb5fda2a..75cc96a79 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 |