diff options
author | Robert Dewar <dewar@adacore.com> | 2007-08-14 10:39:20 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-14 10:39:20 +0200 |
commit | 86cde7b14709c9ac4e599dfd16402d4145e80a05 (patch) | |
tree | 7d8fb8afdbfead121390726f986ccb88012cdda1 /gcc/ada/freeze.ads | |
parent | b2e1beb3f6b7e37ba7950e7d7348951768ea2f72 (diff) | |
download | gcc-86cde7b14709c9ac4e599dfd16402d4145e80a05.zip gcc-86cde7b14709c9ac4e599dfd16402d4145e80a05.tar.gz gcc-86cde7b14709c9ac4e599dfd16402d4145e80a05.tar.bz2 |
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
Diffstat (limited to 'gcc/ada/freeze.ads')
-rw-r--r-- | gcc/ada/freeze.ads | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/freeze.ads b/gcc/ada/freeze.ads index 125a706..13afe37 100644 --- a/gcc/ada/freeze.ads +++ b/gcc/ada/freeze.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2007, 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- -- @@ -121,6 +121,12 @@ package Freeze is -- base types, where the freeze node is preallocated at the point of -- declaration, so that the First_Subtype_Link field can be set. + Freezing_Library_Level_Tagged_Type : Boolean := False; + -- Flag used to indicate that we are freezing the primitives of a library + -- level tagged types. Used to disable checks on premature freezing. + -- More documentation needed??? why is this flag needed? what are these + -- checks? why do they need disabling in some cases? + ----------------- -- Subprograms -- ----------------- |