From cbae498bb28dc9997ed129456abaa95fb0ed6758 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 24 Nov 2009 20:02:40 +0000 Subject: exp_util.adb (Make_CW_Equivalent_Type): Do not mark the type as frozen for targets that do not require front-end layout. * exp_util.adb (Make_CW_Equivalent_Type): Do not mark the type as frozen for targets that do not require front-end layout. (New_Class_Wide_Subtype): Always reset the freezing status to False. * exp_ch8.adb: Do not 'with' Targparm. (Expand_N_Object_Renaming_Declaration): Always freeze a class-wide subtype that has been built from the expression. * exp_intr.adb (Expand_Unc_Deallocation): If the designated type is class wide, freeze the implicit type that has been built from the expression at the dereference point. * freeze.adb (Freeze_Entity): Adjust comment. * gcc-interface/decl.c (Gigi_Equivalent_Type) : Remove useless test. * gcc-interface/trans.c (process_freeze_entity): Do not special-case class-wide subtypes. * s-osinte-aix.adb (clock_gettime): Fix comment. * s-osinte-darwin.adb (clock_gettime): Likewise. From-SVN: r154514 --- gcc/ada/exp_ch8.adb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'gcc/ada/exp_ch8.adb') diff --git a/gcc/ada/exp_ch8.adb b/gcc/ada/exp_ch8.adb index 68fa50e..fc28371 100644 --- a/gcc/ada/exp_ch8.adb +++ b/gcc/ada/exp_ch8.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,7 +35,6 @@ with Sem; use Sem; with Sem_Ch8; use Sem_Ch8; with Sinfo; use Sinfo; with Stand; use Stand; -with Targparm; use Targparm; package body Exp_Ch8 is @@ -254,15 +253,9 @@ package body Exp_Ch8 is Set_Etype (Defining_Identifier (N), Entity (Subtype_Mark (N))); -- Freeze the class-wide subtype here to ensure that the subtype - -- and equivalent type are frozen before the renaming. This is - -- required for targets where Frontend_Layout_On_Target is true. - -- For targets where Gigi is used, class-wide subtype should not - -- be frozen (in that case the subtype is marked as already frozen - -- when it's created). - - if Frontend_Layout_On_Target then - Freeze_Before (N, Entity (Subtype_Mark (N))); - end if; + -- and equivalent type are frozen before the renaming. + + Freeze_Before (N, Entity (Subtype_Mark (N))); end if; -- Ada 2005 (AI-318-02): If the renamed object is a call to a build-in- -- cgit v1.1