aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_aggr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r--gcc/ada/exp_aggr.adb27
1 files changed, 15 insertions, 12 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 90473b77547..db9e1d7784c 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -56,7 +56,6 @@ with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Snames; use Snames;
with Stand; use Stand;
-with Targparm; use Targparm;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
@@ -623,7 +622,9 @@ package body Exp_Aggr is
-- with tagged components, but not clear whether it's worthwhile ???;
-- in the case of the JVM, object tags are handled implicitly)
- if Is_Tagged_Type (Component_Type (Typ)) and then VM_Target = No_VM then
+ if Is_Tagged_Type (Component_Type (Typ))
+ and then Tagged_Type_Expansion
+ then
return False;
end if;
@@ -1188,12 +1189,12 @@ package body Exp_Aggr is
Append_To (L, A);
-- Adjust the tag if tagged (because of possible view
- -- conversions), unless compiling for the Java VM where
+ -- conversions), unless compiling for a VM where
-- tags are implicit.
if Present (Comp_Type)
and then Is_Tagged_Type (Comp_Type)
- and then VM_Target = No_VM
+ and then Tagged_Type_Expansion
then
A :=
Make_OK_Assignment_Statement (Loc,
@@ -2619,7 +2620,7 @@ package body Exp_Aggr is
-- the subsequent deep_adjust works properly (unless VM_Target,
-- where tags are implicit).
- if VM_Target = No_VM then
+ if Tagged_Type_Expansion then
Instr :=
Make_OK_Assignment_Statement (Loc,
Name =>
@@ -3032,7 +3033,9 @@ package body Exp_Aggr is
-- tmp.comp._tag := comp_typ'tag;
- if Is_Tagged_Type (Comp_Type) and then VM_Target = No_VM then
+ if Is_Tagged_Type (Comp_Type)
+ and then Tagged_Type_Expansion
+ then
Instr :=
Make_OK_Assignment_Statement (Loc,
Name =>
@@ -3155,7 +3158,7 @@ package body Exp_Aggr is
elsif Is_CPP_Class (Typ) then
null;
- elsif Is_Tagged_Type (Typ) and then VM_Target = No_VM then
+ elsif Is_Tagged_Type (Typ) and then Tagged_Type_Expansion then
Instr :=
Make_OK_Assignment_Statement (Loc,
Name =>
@@ -5298,7 +5301,7 @@ package body Exp_Aggr is
else
Set_Etype (N, Typ);
- if VM_Target = No_VM then
+ if Tagged_Type_Expansion then
Expand_Record_Aggregate (N,
Orig_Tag =>
New_Occurrence_Of
@@ -5389,7 +5392,7 @@ package body Exp_Aggr is
or else (Is_Entity_Name (Expr_Q)
and then
Ekind (Entity (Expr_Q)) in Formal_Kind))
- and then VM_Target = No_VM
+ and then Tagged_Type_Expansion
then
Static_Components := False;
return True;
@@ -5735,7 +5738,7 @@ package body Exp_Aggr is
if Present (Orig_Tag) then
Tag_Value := Orig_Tag;
- elsif VM_Target /= No_VM then
+ elsif not Tagged_Type_Expansion then
Tag_Value := Empty;
else
Tag_Value :=
@@ -5799,7 +5802,7 @@ package body Exp_Aggr is
-- For a root type, the tag component is added (unless compiling
-- for the VMs, where tags are implicit).
- elsif VM_Target = No_VM then
+ elsif Tagged_Type_Expansion then
declare
Tag_Name : constant Node_Id :=
New_Occurrence_Of
@@ -5901,7 +5904,7 @@ package body Exp_Aggr is
begin
return Static_Dispatch_Tables
- and then VM_Target = No_VM
+ and then Tagged_Type_Expansion
and then RTU_Loaded (Ada_Tags)
-- Avoid circularity when rebuilding the compiler