From db222eadb159ec04d1e7884c701e61e99e7e37c2 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 22 May 2015 12:53:29 +0200 Subject: [PATCH] [multiple changes] 2015-05-22 Robert Dewar * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming component of an object to which Volatile_Full_Access applies. 2015-05-22 Jerome Guitton * exp_dbug.ads: Add note about non bit-packed arrays. 2015-05-22 Eric Botcazou * sem_prag.adb: Fix typo. * einfo.ads: Grammar fixes in comments. 2015-05-22 Bob Duff * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads, * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads, * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads, * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads, * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads, * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads, * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type): Add an initialization expression "raise Program_Error". See, for example, RM-A.18.2(148.4). From-SVN: r223548 --- gcc/ada/ChangeLog | 26 ++++++++++++++++++++++++++ gcc/ada/a-cbdlli.ads | 18 +++++++++++++----- gcc/ada/a-cbhama.ads | 18 +++++++++++++----- gcc/ada/a-cbhase.ads | 12 ++++++++---- gcc/ada/a-cbmutr.ads | 14 +++++++++++--- gcc/ada/a-cborma.ads | 18 +++++++++++++----- gcc/ada/a-cborse.ads | 14 +++++++++----- gcc/ada/a-cdlili.ads | 18 +++++++++++++----- gcc/ada/a-cidlli.ads | 18 +++++++++++++----- gcc/ada/a-cihama.ads | 18 +++++++++++++----- gcc/ada/a-cihase.ads | 14 +++++++++++--- gcc/ada/a-cimutr.ads | 14 +++++++++++--- gcc/ada/a-ciorma.ads | 18 +++++++++++++----- gcc/ada/a-ciormu.ads | 6 +++++- gcc/ada/a-ciorse.ads | 10 +++++++--- gcc/ada/a-cobove.ads | 20 ++++++++++++++------ gcc/ada/a-cohama.ads | 18 +++++++++++++----- gcc/ada/a-cohase.ads | 8 ++++++-- gcc/ada/a-coinho-shared.ads | 20 ++++++++++++++------ gcc/ada/a-coinho.ads | 20 ++++++++++++++------ gcc/ada/a-coinve.ads | 14 +++++++++++--- gcc/ada/a-comutr.ads | 14 +++++++++++--- gcc/ada/a-convec.ads | 18 +++++++++++++----- gcc/ada/a-coorma.ads | 18 +++++++++++++----- gcc/ada/a-coormu.ads | 6 +++++- gcc/ada/a-coorse.ads | 10 +++++++--- gcc/ada/einfo.ads | 6 +++--- gcc/ada/exp_dbug.ads | 5 ++++- gcc/ada/sem_ch8.adb | 19 +++++++++++++++++++ gcc/ada/sem_prag.adb | 2 +- 30 files changed, 327 insertions(+), 107 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e2b22ddcffc..161d0cf4c96 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,29 @@ +2015-05-22 Robert Dewar + + * sem_ch8.adb (Analyze_Object_Renaming): Check for renaming + component of an object to which Volatile_Full_Access applies. + +2015-05-22 Jerome Guitton + + * exp_dbug.ads: Add note about non bit-packed arrays. + +2015-05-22 Eric Botcazou + + * sem_prag.adb: Fix typo. + * einfo.ads: Grammar fixes in comments. + +2015-05-22 Bob Duff + + * a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads, + * a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads, + * a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads, + * a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads, + * a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads, + * a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads, + * a-coinho-shared.ads (Constant_Reference_Type, Reference_Type): + Add an initialization expression "raise Program_Error". See, + for example, RM-A.18.2(148.4). + 2015-05-22 Robert Dewar * debug.adb: Update documentation. diff --git a/gcc/ada/a-cbdlli.ads b/gcc/ada/a-cbdlli.ads index d7a1f494682..603cb35b7a0 100644 --- a/gcc/ada/a-cbdlli.ads +++ b/gcc/ada/a-cbdlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -313,9 +313,13 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Read (Stream : not null access Root_Stream_Type'Class; @@ -330,7 +334,11 @@ private for Constant_Reference_Type'Write use Write; type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cbhama.ads b/gcc/ada/a-cbhama.ads index a87c1e9eeae..a03bfe6ab07 100644 --- a/gcc/ada/a-cbhama.ads +++ b/gcc/ada/a-cbhama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -392,9 +392,13 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Write (Stream : not null access Root_Stream_Type'Class; @@ -409,7 +413,11 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cbhase.ads b/gcc/ada/a-cbhase.ads index 619aec9debc..c24fa8a1cf0 100644 --- a/gcc/ada/a-cbhase.ads +++ b/gcc/ada/a-cbhase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -549,9 +549,13 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Read (Stream : not null access Root_Stream_Type'Class; diff --git a/gcc/ada/a-cbmutr.ads b/gcc/ada/a-cbmutr.ads index 7fe4b4e2ff5..127b179d43c 100644 --- a/gcc/ada/a-cbmutr.ads +++ b/gcc/ada/a-cbmutr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2014-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -346,7 +346,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -362,7 +366,11 @@ private type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cborma.ads b/gcc/ada/a-cborma.ads index d0286827f0d..df1a2a2076f 100644 --- a/gcc/ada/a-cborma.ads +++ b/gcc/ada/a-cborma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -295,9 +295,13 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Read (Stream : not null access Root_Stream_Type'Class; @@ -312,7 +316,11 @@ private for Constant_Reference_Type'Write use Write; type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-cborse.ads b/gcc/ada/a-cborse.ads index 09cb6510b2c..9b474a66353 100644 --- a/gcc/ada/a-cborse.ads +++ b/gcc/ada/a-cborse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -388,10 +388,14 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + (Element : not null access constant Element_Type) is + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Read (Stream : not null access Root_Stream_Type'Class; diff --git a/gcc/ada/a-cdlili.ads b/gcc/ada/a-cdlili.ads index c99e7350afc..7740566af6d 100644 --- a/gcc/ada/a-cdlili.ads +++ b/gcc/ada/a-cdlili.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -319,9 +319,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -337,9 +341,13 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cidlli.ads b/gcc/ada/a-cidlli.ads index a7e133c303d..932fecbf326 100644 --- a/gcc/ada/a-cidlli.ads +++ b/gcc/ada/a-cidlli.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -313,9 +313,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -331,9 +335,13 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index 6e2df212a22..a224b3c5454 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -379,9 +379,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -397,9 +401,13 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cihase.ads b/gcc/ada/a-cihase.ads index 05af6bf32ed..f9ae2ac6220 100644 --- a/gcc/ada/a-cihase.ads +++ b/gcc/ada/a-cihase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -449,7 +449,11 @@ package Ada.Containers.Indefinite_Hashed_Sets is pragma Inline (Finalize); type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; use Ada.Streams; @@ -541,7 +545,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-cimutr.ads b/gcc/ada/a-cimutr.ads index 6c3411f1314..48d2d5fabd4 100644 --- a/gcc/ada/a-cimutr.ads +++ b/gcc/ada/a-cimutr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -394,7 +394,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read @@ -412,7 +416,11 @@ private type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-ciorma.ads b/gcc/ada/a-ciorma.ads index e414d39cf71..2882a084bd2 100644 --- a/gcc/ada/a-ciorma.ads +++ b/gcc/ada/a-ciorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -308,9 +308,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read @@ -326,9 +330,13 @@ private for Constant_Reference_Type'Write use Write; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-ciormu.ads b/gcc/ada/a-ciormu.ads index 68d1835bed9..7524cf7be3c 100644 --- a/gcc/ada/a-ciormu.ads +++ b/gcc/ada/a-ciormu.ads @@ -489,7 +489,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; type Cursor is record diff --git a/gcc/ada/a-ciorse.ads b/gcc/ada/a-ciorse.ads index 830f9886624..c885b80478e 100644 --- a/gcc/ada/a-ciorse.ads +++ b/gcc/ada/a-ciorse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -409,9 +409,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-cobove.ads b/gcc/ada/a-cobove.ads index 862076a2a92..3bd1843d7b3 100644 --- a/gcc/ada/a-cobove.ads +++ b/gcc/ada/a-cobove.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -420,10 +420,14 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + (Element : not null access constant Element_Type) is + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Read (Stream : not null access Root_Stream_Type'Class; @@ -438,7 +442,11 @@ private for Constant_Reference_Type'Write use Write; type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index 540e24af19d..049ec448c10 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -385,9 +385,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -403,9 +407,13 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads index a9990ce6b8d..b80907802a3 100644 --- a/gcc/ada/a-cohase.ads +++ b/gcc/ada/a-cohase.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -554,7 +554,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-coinho-shared.ads b/gcc/ada/a-coinho-shared.ads index 2ec30f88aef..49b91fd6ae3 100644 --- a/gcc/ada/a-coinho-shared.ads +++ b/gcc/ada/a-coinho-shared.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -145,10 +145,14 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + (Element : not null access constant Element_Type) is + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Write (Stream : not null access Root_Stream_Type'Class; @@ -163,7 +167,11 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-coinho.ads b/gcc/ada/a-coinho.ads index 2f81d750fce..271d4ea0d63 100644 --- a/gcc/ada/a-coinho.ads +++ b/gcc/ada/a-coinho.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -131,10 +131,14 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is - record - Control : Reference_Control_Type; - end record; + (Element : not null access constant Element_Type) is + record + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." + end record; procedure Write (Stream : not null access Root_Stream_Type'Class; @@ -149,7 +153,11 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-coinve.ads b/gcc/ada/a-coinve.ads index 2c841671af4..d2f7252e560 100644 --- a/gcc/ada/a-coinve.ads +++ b/gcc/ada/a-coinve.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -426,7 +426,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -444,7 +448,11 @@ private type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-comutr.ads b/gcc/ada/a-comutr.ads index c1a3dc85cd5..3ea29452929 100644 --- a/gcc/ada/a-comutr.ads +++ b/gcc/ada/a-comutr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -443,7 +443,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read @@ -461,7 +465,11 @@ private type Reference_Type (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-convec.ads b/gcc/ada/a-convec.ads index 81d1a18d062..00dfda2adeb 100644 --- a/gcc/ada/a-convec.ads +++ b/gcc/ada/a-convec.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -432,9 +432,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write @@ -450,9 +454,13 @@ private for Constant_Reference_Type'Read use Read; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index 2a642ac47cb..c30520f33da 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -309,9 +309,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read @@ -327,9 +331,13 @@ private for Constant_Reference_Type'Write use Write; type Reference_Type - (Element : not null access Element_Type) is + (Element : not null access Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Read diff --git a/gcc/ada/a-coormu.ads b/gcc/ada/a-coormu.ads index d7e7b94152b..51785820b50 100644 --- a/gcc/ada/a-coormu.ads +++ b/gcc/ada/a-coormu.ads @@ -493,7 +493,11 @@ private type Constant_Reference_Type (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; type Cursor is record diff --git a/gcc/ada/a-coorse.ads b/gcc/ada/a-coorse.ads index 315134554e9..3e16c944fb0 100644 --- a/gcc/ada/a-coorse.ads +++ b/gcc/ada/a-coorse.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- @@ -392,9 +392,13 @@ private pragma Inline (Finalize); type Constant_Reference_Type - (Element : not null access constant Element_Type) is + (Element : not null access constant Element_Type) is record - Control : Reference_Control_Type; + Control : Reference_Control_Type := + raise Program_Error with "uninitialized reference"; + -- The RM says, "The default initialization of an object of + -- type Constant_Reference_Type or Reference_Type propagates + -- Program_Error." end record; procedure Write diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 5fe5da82359..58f35215ef1 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -166,7 +166,7 @@ package Einfo is -- the Value_Size values differ generate a warning, and are potentially -- target dependent). --- The default rule for the value of Value_Size are as follows: +-- The default rules for the value of Value_Size are as follows: -- The Value_Size for a base subtype is the minimum number of bits -- required to store all values of the type (including the sign bit @@ -180,9 +180,9 @@ package Einfo is -- All other subtypes have a Value_Size corresponding to the minimum -- number of bits required to store all values of the subtype. For -- dynamic bounds, it is assumed that the value can range down or up --- to the corresponding bound of the ancestor +-- to the corresponding bound of the ancestor. --- The RM defined attribute Size corresponds to the Value_Size attribute +-- The RM defined attribute Size corresponds to the Value_Size attribute. -- The Size attribute may be defined for a first-named subtype. This sets -- the Value_Size of the first-named subtype to the given value, and the diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 727be929aae..352e57ff215 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2015, 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- -- @@ -1061,6 +1061,9 @@ package Exp_Dbug is -- ttt is the name of the original declared array -- nnn is the component size in bits (1-31) + -- Note that if the packed array is not bit-packed, the name will simply + -- be tttP. + -- When the debugger sees that an object is of a type that is encoded in -- this manner, it can use the original type to determine the bounds and -- the component type, and the component size to determine the packing diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index d3784f8589c..20ec73aeb80 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -912,6 +912,25 @@ package body Sem_Ch8 is ("renaming of conversion only allowed for tagged types", Nam); end if; + -- Reject renaming of component of Volatile_Full_Access object + + if Nkind_In (Nam, N_Selected_Component, N_Indexed_Component) then + declare + P : constant Node_Id := Prefix (Nam); + begin + if Is_Entity_Name (P) then + if Has_Volatile_Full_Access (Entity (P)) + or else + Has_Volatile_Full_Access (Etype (P)) + then + Error_Msg_N + ("cannot rename component of Volatile_Full_Access " + & "object", Nam); + end if; + end if; + end; + end if; + Resolve (Nam, T); -- If the renamed object is a function call of a limited type, diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 43c13055516..d3babe8cc47 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -5898,7 +5898,7 @@ package body Sem_Prag is ("cannot have Volatile_Full_Access and Atomic for same entity"); end if; - -- Check for applying VFA to an entity which has volatile component + -- Check for applying VFA to an entity which has aliased component if Prag_Id = Pragma_Volatile_Full_Access then declare -- 2.30.2