exp_util.ads, [...]: This patch replaces a number of occurrences of explicit tests...
authorRobert Dewar <dewar@adacore.com>
Tue, 14 Aug 2007 08:39:20 +0000 (10:39 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 14 Aug 2007 08:39:20 +0000 (10:39 +0200)
commit86cde7b14709c9ac4e599dfd16402d4145e80a05
tree7d8fb8afdbfead121390726f986ccb88012cdda1
parentb2e1beb3f6b7e37ba7950e7d7348951768ea2f72
exp_util.ads, [...]: This patch replaces a number of occurrences of explicit tests for N_Null with...

2007-08-14  Robert Dewar  <dewar@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>
    Javier Miranda  <miranda@adacore.com>

* exp_util.ads, exp_util.adb:
This patch replaces a number of occurrences of explicit tests for N_Null
with calls to Known_Null. This improves tracking of null values, since
Known_Null also catches null constants, and variables currently known to
be null, so we get better tracking.
(Ensure_Defined): create an itype reference only in the scope of the
itype.
(Side_Effect_Free): A selected component of an access type that
denotes a component with a rep clause must be treated as not
side-effect free, because if it is part of a linked structure its
value may be affected by a renaming.
(Expand_Subtype_From_Expr): For limited objects initialized with build
in place function calls, do nothing; otherwise we prematurely introduce
an N_Reference node in the expression initializing the object, which
breaks the circuitry that detects and adds the additional arguments to
the called function. Bug found working in the new patch for statically
allocated dispatch tables.
(Is_Library_Level_Tagged_Type): New subprogram.
(Remove_Side_Effects): If the expression of an elementary type is an
operator treat as a function call.
(Make_Literal_Range): If the index type of the array is not integer, use
attributes properly to compute the constraint on the resulting aggregate
which is a string.

* freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
class-wide type whose base type is an incomplete private type, leave
class-wide type unfrozen so that freeze nodes can be generated
properly at a later point.
(Freeze_Entity, array case): Handle case of pragma Pack and component
size attributre clause for same array.

From-SVN: r127419
gcc/ada/exp_util.adb
gcc/ada/exp_util.ads
gcc/ada/freeze.adb
gcc/ada/freeze.ads