This patch causes default initialization of objects of types Constant_Reference_Type and Reference_Type in the containers packages to raise Program_Error as required by the RM.
Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-22 Bob Duff <d...@adacore.com> * 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).
Index: a-cdlili.ads =================================================================== --- a-cdlili.ads (revision 223476) +++ a-cdlili.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cihama.ads =================================================================== --- a-cihama.ads (revision 223476) +++ a-cihama.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-coinve.ads =================================================================== --- a-coinve.ads (revision 223476) +++ a-coinve.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-ciorse.ads =================================================================== --- a-ciorse.ads (revision 223476) +++ a-ciorse.ads (working copy) @@ -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 @@ 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 Index: a-coorma.ads =================================================================== --- a-coorma.ads (revision 223476) +++ a-coorma.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cborma.ads =================================================================== --- a-cborma.ads (revision 223476) +++ a-cborma.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cidlli.ads =================================================================== --- a-cidlli.ads (revision 223476) +++ a-cidlli.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cimutr.ads =================================================================== --- a-cimutr.ads (revision 223476) +++ a-cimutr.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-ciormu.ads =================================================================== --- a-ciormu.ads (revision 223476) +++ a-ciormu.ads (working copy) @@ -489,7 +489,11 @@ 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 Index: a-cihase.ads =================================================================== --- a-cihase.ads (revision 223476) +++ a-cihase.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cohama.ads =================================================================== --- a-cohama.ads (revision 223476) +++ a-cohama.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-coorse.ads =================================================================== --- a-coorse.ads (revision 223476) +++ a-coorse.ads (working copy) @@ -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 @@ 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 Index: a-cbhama.ads =================================================================== --- a-cbhama.ads (revision 223476) +++ a-cbhama.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cborse.ads =================================================================== --- a-cborse.ads (revision 223476) +++ a-cborse.ads (working copy) @@ -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 @@ 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; Index: a-comutr.ads =================================================================== --- a-comutr.ads (revision 223476) +++ a-comutr.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-ciorma.ads =================================================================== --- a-ciorma.ads (revision 223476) +++ a-ciorma.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cobove.ads =================================================================== --- a-cobove.ads (revision 223476) +++ a-cobove.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-coormu.ads =================================================================== --- a-coormu.ads (revision 223476) +++ a-coormu.ads (working copy) @@ -493,7 +493,11 @@ 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 Index: a-convec.ads =================================================================== --- a-convec.ads (revision 223476) +++ a-convec.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cohase.ads =================================================================== --- a-cohase.ads (revision 223476) +++ a-cohase.ads (working copy) @@ -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 @@ 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 Index: a-coinho.ads =================================================================== --- a-coinho.ads (revision 223476) +++ a-coinho.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-coinho-shared.ads =================================================================== --- a-coinho-shared.ads (revision 223476) +++ a-coinho-shared.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cbdlli.ads =================================================================== --- a-cbdlli.ads (revision 223476) +++ a-cbdlli.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cbmutr.ads =================================================================== --- a-cbmutr.ads (revision 223476) +++ a-cbmutr.ads (working copy) @@ -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 @@ 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 @@ 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 Index: a-cbhase.ads =================================================================== --- a-cbhase.ads (revision 223476) +++ a-cbhase.ads (working copy) @@ -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 @@ 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;