aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/sem_aux.adb18
-rw-r--r--gcc/ada/sem_aux.ads4
-rw-r--r--gcc/ada/sem_ch3.adb12
3 files changed, 0 insertions, 34 deletions
diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb
index 5edf667..e7d5c84 100644
--- a/gcc/ada/sem_aux.adb
+++ b/gcc/ada/sem_aux.adb
@@ -699,24 +699,6 @@ package body Sem_Aux is
return Present (Get_Rep_Pragma (E, Nam1, Nam2, Check_Parents));
end Has_Rep_Pragma;
- --------------------------------
- -- Has_Unconstrained_Elements --
- --------------------------------
-
- function Has_Unconstrained_Elements (T : Entity_Id) return Boolean is
- U_T : constant Entity_Id := Underlying_Type (T);
- begin
- if No (U_T) then
- return False;
- elsif Is_Record_Type (U_T) then
- return Has_Discriminants (U_T) and then not Is_Constrained (U_T);
- elsif Is_Array_Type (U_T) then
- return Has_Unconstrained_Elements (Component_Type (U_T));
- else
- return False;
- end if;
- end Has_Unconstrained_Elements;
-
----------------------
-- Has_Variant_Part --
----------------------
diff --git a/gcc/ada/sem_aux.ads b/gcc/ada/sem_aux.ads
index f14a9a1..ae94c1e 100644
--- a/gcc/ada/sem_aux.ads
+++ b/gcc/ada/sem_aux.ads
@@ -261,10 +261,6 @@ package Sem_Aux is
-- irregularity compared to other representation aspects, and the cost of
-- looking up the aspect when needed is small.
- function Has_Unconstrained_Elements (T : Entity_Id) return Boolean;
- -- True if T has discriminants and is unconstrained, or is an array type
- -- whose element type Has_Unconstrained_Elements.
-
function Has_Variant_Part (Typ : Entity_Id) return Boolean;
-- Return True if the first subtype of Typ is a discriminated record type
-- which has a variant part. False otherwise.
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index b684f69..28fc25d 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -5213,18 +5213,6 @@ package body Sem_Ch3 is
Rewrite (Object_Definition (N), New_Occurrence_Of (Act_T, Loc));
Freeze_Before (N, Act_T);
- elsif Nkind (E) = N_Function_Call
- and then Constant_Present (N)
- and then Has_Unconstrained_Elements (Etype (E))
- then
- -- The back-end has problems with constants of a discriminated type
- -- with defaults, if the initial value is a function call. We
- -- generate an intermediate temporary that will receive a reference
- -- to the result of the call. The initialization expression then
- -- becomes a dereference of that temporary.
-
- Remove_Side_Effects (E);
-
-- If this is a constant declaration of an unconstrained type and
-- the initialization is an aggregate, we can use the subtype of the
-- aggregate for the declared entity because it is immutable.