summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-06 09:08:27 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-06 09:08:27 +0000
commit549be29125e4771c48d39d6755c6a6700ac3ff9b (patch)
treeeeacd2423d3d5b61a7590d18c11d448624ba69b7 /gcc/ada/sem_attr.adb
parent2f582d724268d2f007726a022170c807f61e6b39 (diff)
downloadgcc-549be29125e4771c48d39d6755c6a6700ac3ff9b.tar.gz
2009-05-06 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb (Locate_Directory): Remove unused parameters, and add support for returning the directory even if it doesn't exist. This is used for the object directory, since we are always setting it to a non-null value, and we should set it to an absolute name rather than a relative name for the sake of external tools that might depend on it. (Check_Library_Attributes): When Project.Library_Dir is known, check that the directory exists. 2009-05-06 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Check_Dereference): If the prefix of an attribute reference is an implicit dereference, do not freeze the designated type if within a default expression or when preanalyzing a pre/postcondtion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147157 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 449b0556c85..6059401fd53 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -1067,8 +1067,13 @@ package body Sem_Attr is
-- If there is an implicit dereference, then we must freeze
-- the designated type of the access type, since the type of
-- the referenced array is this type (see AI95-00106).
+ -- As done elsewhere, freezing must not happen when pre-analyzing
+ -- a pre- or postcondition or a default value for an object or
+ -- for a formal parameter.
- Freeze_Before (N, Designated_Type (P_Type));
+ if not In_Spec_Expression then
+ Freeze_Before (N, Designated_Type (P_Type));
+ end if;
Rewrite (P,
Make_Explicit_Dereference (Sloc (P),