aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch3.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@act-europe.fr>2003-10-22 11:28:08 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2003-10-22 11:28:08 +0200
commit0c644933b86d506a4b6dd9bdb6b054f6aed24df9 (patch)
tree3382b1929ce73dcbba9d81c17a6d7dac301b444b /gcc/ada/exp_ch3.adb
parent12be91a78c9f6caadd4024d3af5bc468f9a32130 (diff)
downloadgcc-0c644933b86d506a4b6dd9bdb6b054f6aed24df9.zip
gcc-0c644933b86d506a4b6dd9bdb6b054f6aed24df9.tar.gz
gcc-0c644933b86d506a4b6dd9bdb6b054f6aed24df9.tar.bz2
re PR ada/5677 (Assert failure in nlists.adb:933)
2003-10-22 Arnaud Charlet <charlet@act-europe.fr> * gnat_wrapper.adb: New file. 2003/10/22 Jerome Roussel <roussel@act-europe.fr> * g-regpat.ads, g-regpat.adb (Match): new function, to know if a string match a pre compiled regular expression (the corresponding version of the function working on a raw regular expression) Fix typos in various comments Update copyright notice in spec 2003/10/21 Gary Dismukes <dismukes@gnat.com> * exp_ch3.adb: (Component_Needs_Simple_Initialization): Return False when the type is a packed bit array. Revise spec comments to document this case. * exp_prag.adb: (Expand_Pragma_Import): Set any expression on the imported object to empty to avoid initializing imported objects (in particular this covers the case of zero-initialization of bit arrays). Update copyright notice. 2003/10/21 Ed Schonberg <schonberg@gnat.com> * sem_ch12.adb: (Load_Parent_Of_Generic): If parent is compilation unit, stop search, a subunit is missing. (Instantiate_Subprogram_Body): If body of function is missing, set type of return expression explicitly in dummy body, to prevent cascaded errors when a subunit is missing. Fixes PR 5677. * sem_ch3.adb: (Access_Subprogram_Declaration): Verify that return type is valid. Fixes PR 8693. * sem_elab.adb: (Check_Elab_Calls): Do not apply elaboration checks if the main unit is generic. Fixes PR 12318. * sem_util.adb: (Corresponding_Discriminant): If the scope of the discriminant is a private type without discriminant, use its full view. Fixes PR 8247. From-SVN: r72792
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r--gcc/ada/exp_ch3.adb20
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 866ce99..a6d058d 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -1368,11 +1368,18 @@ package body Exp_Ch3 is
(T : Entity_Id)
return Boolean;
-- Determines if a component needs simple initialization, given its
- -- type T. This is identical to Needs_Simple_Initialization, except
- -- that the types Tag and Vtable_Ptr, which are access types which
- -- would normally require simple initialization to null, do not
- -- require initialization as components, since they are explicitly
- -- initialized by other means.
+ -- type T. This is the same as Needs_Simple_Initialization except
+ -- for the following differences. The types Tag and Vtable_Ptr,
+ -- which are access types which would normally require simple
+ -- initialization to null, do not require initialization as
+ -- components, since they are explicitly initialized by other
+ -- means. The other relaxation is for packed bit arrays that are
+ -- associated with a modular type, which in some cases require
+ -- zero initialization to properly support comparisons, except
+ -- that comparison of such components always involves an explicit
+ -- selection of only the component's specific bits (whether or not
+ -- there are adjacent components or gaps), so zero initialization
+ -- is never needed for components.
procedure Constrain_Array
(SI : Node_Id;
@@ -2144,7 +2151,8 @@ package body Exp_Ch3 is
return
Needs_Simple_Initialization (T)
and then not Is_RTE (T, RE_Tag)
- and then not Is_RTE (T, RE_Vtable_Ptr);
+ and then not Is_RTE (T, RE_Vtable_Ptr)
+ and then not Is_Bit_Packed_Array (T);
end Component_Needs_Simple_Initialization;
---------------------