summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb91
1 files changed, 26 insertions, 65 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index f05ad7fdb79..71df079f69c 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -4924,49 +4924,36 @@ package body Sem_Ch13 is
-- will be used to represent the biased subtype that reflects
-- the biased representation of components. We need the subtype
-- to get proper conversions on referencing elements of the
- -- array. Note: component size clauses are ignored in VM mode.
-
- if VM_Target = No_VM then
- if Biased then
- New_Ctyp :=
- Make_Defining_Identifier (Loc,
- Chars =>
- New_External_Name (Chars (U_Ent), 'C', 0, 'T'));
-
- Decl :=
- Make_Subtype_Declaration (Loc,
- Defining_Identifier => New_Ctyp,
- Subtype_Indication =>
- New_Occurrence_Of (Component_Type (Btype), Loc));
-
- Set_Parent (Decl, N);
- Analyze (Decl, Suppress => All_Checks);
-
- Set_Has_Delayed_Freeze (New_Ctyp, False);
- Set_Esize (New_Ctyp, Csize);
- Set_RM_Size (New_Ctyp, Csize);
- Init_Alignment (New_Ctyp);
- Set_Is_Itype (New_Ctyp, True);
- Set_Associated_Node_For_Itype (New_Ctyp, U_Ent);
-
- Set_Component_Type (Btype, New_Ctyp);
- Set_Biased (New_Ctyp, N, "component size clause");
- end if;
+ -- array.
- Set_Component_Size (Btype, Csize);
+ if Biased then
+ New_Ctyp :=
+ Make_Defining_Identifier (Loc,
+ Chars =>
+ New_External_Name (Chars (U_Ent), 'C', 0, 'T'));
- -- For VM case, we ignore component size clauses
+ Decl :=
+ Make_Subtype_Declaration (Loc,
+ Defining_Identifier => New_Ctyp,
+ Subtype_Indication =>
+ New_Occurrence_Of (Component_Type (Btype), Loc));
- else
- -- Give a warning unless we are in GNAT mode, in which case
- -- the warning is suppressed since it is not useful.
+ Set_Parent (Decl, N);
+ Analyze (Decl, Suppress => All_Checks);
- if not GNAT_Mode then
- Error_Msg_N
- ("component size ignored in this configuration??", N);
- end if;
+ Set_Has_Delayed_Freeze (New_Ctyp, False);
+ Set_Esize (New_Ctyp, Csize);
+ Set_RM_Size (New_Ctyp, Csize);
+ Init_Alignment (New_Ctyp);
+ Set_Is_Itype (New_Ctyp, True);
+ Set_Associated_Node_For_Itype (New_Ctyp, U_Ent);
+
+ Set_Component_Type (Btype, New_Ctyp);
+ Set_Biased (New_Ctyp, N, "component size clause");
end if;
+ Set_Component_Size (Btype, Csize);
+
-- Deal with warning on overridden size
if Warn_On_Overridden_Size
@@ -5142,12 +5129,6 @@ package body Sem_Ch13 is
("static string required for tag name!", Nam);
end if;
- if VM_Target /= No_VM then
- Error_Msg_Name_1 := Attr;
- Error_Msg_N
- ("% attribute unsupported in this configuration", Nam);
- end if;
-
if not Is_Library_Level_Entity (U_Ent) then
Error_Msg_NE
("??non-unique external tag supplied for &", N, U_Ent);
@@ -5463,16 +5444,6 @@ package body Sem_Ch13 is
("size cannot be given for unconstrained array", Nam);
elsif Size /= No_Uint then
- if VM_Target /= No_VM and then not GNAT_Mode then
-
- -- Size clause is not handled properly on VM targets.
- -- Display a warning unless we are in GNAT mode, in which
- -- case this is useless.
-
- Error_Msg_N
- ("size clauses are ignored in this configuration??", N);
- end if;
-
if Is_Type (U_Ent) then
Etyp := U_Ent;
else
@@ -11356,7 +11327,7 @@ package body Sem_Ch13 is
Address_Clause_Checks.Init;
Unchecked_Conversions.Init;
- if VM_Target /= No_VM or else AAMP_On_Target then
+ if AAMP_On_Target then
Independence_Checks.Init;
end if;
end Initialize;
@@ -12412,17 +12383,7 @@ package body Sem_Ch13 is
and then Known_Component_Size (T2)
and then Component_Size (T1) = Component_Size (T2)
then
- if VM_Target = No_VM then
- return True;
-
- -- In VM targets the representation of arrays with aliased
- -- components differs from arrays with non-aliased components
-
- else
- return Has_Aliased_Components (Base_Type (T1))
- =
- Has_Aliased_Components (Base_Type (T2));
- end if;
+ return True;
end if;
end if;