diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 14:35:51 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 14:35:51 +0000 |
commit | 649455a4336868a1955d0f1d3e38bcbff066b41c (patch) | |
tree | b5e1f2abc5121468e223785e5208e0e3f4d7158a /gcc/ada/exp_ch3.adb | |
parent | 52b9debb0b7fd58c5a12c565d77f15924022f957 (diff) | |
download | gcc-649455a4336868a1955d0f1d3e38bcbff066b41c.tar.gz |
2011-08-02 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Suppress_Initialization): Replaces
Suppress_Init_Procs.
* exp_ch3.adb, exp_disp.adb, freeze.adb: Use
Suppress_Initialization/Initialization_Suppressed.
* gnat_rm.texi: New documentation for pragma Suppress_Initialization
* sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
* sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
* sem_prag.adb: New processing for pragma Suppress_Initialization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r-- | gcc/ada/exp_ch3.adb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index f41db862898..eb1c6dc8148 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -674,7 +674,7 @@ package body Exp_Ch3 is -- 3. The type has CIL/JVM convention. -- 4. An initialization already exists for the base type - if Suppress_Init_Proc (A_Type) + if Initialization_Suppressed (A_Type) or else Is_Value_Type (Comp_Type) or else Convention (A_Type) = Convention_CIL or else Convention (A_Type) = Convention_Java @@ -3216,7 +3216,7 @@ package body Exp_Ch3 is begin -- Definitely do not need one if specifically suppressed - if Suppress_Init_Proc (Rec_Id) then + if Initialization_Suppressed (Rec_Id) then return False; end if; @@ -4682,12 +4682,9 @@ package body Exp_Ch3 is and then not Is_Value_Type (Typ) - -- Suppress call if Suppress_Init_Proc set on the type. This is - -- needed for the derived type case, where Suppress_Initialization - -- may be set for the derived type, even if there is an init proc - -- defined for the root type. + -- Suppress call if initialization suppressed for the type - and then not Suppress_Init_Proc (Typ) + and then not Initialization_Suppressed (Typ) then -- Return without initializing when No_Default_Initialization -- applies. Note that the actual restriction check occurs later, @@ -8536,6 +8533,12 @@ package body Exp_Ch3 is or (Initialize_Scalars and Consider_IS); begin + -- Never need initialization if it is suppressed + + if Initialization_Suppressed (T) then + return False; + end if; + -- Check for private type, in which case test applies to the underlying -- type of the private type. |