summaryrefslogtreecommitdiff
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 10:39:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 10:39:30 +0000
commit2f1aac99b60b55722a9d79ba7202a84bc5f3cf7e (patch)
treec5a8963e970a6abe500cd73f739c2b706386f685 /gcc/ada/freeze.adb
parenta67a63e2f256e0ea10297c519be188f09c4a8189 (diff)
downloadgcc-2f1aac99b60b55722a9d79ba7202a84bc5f3cf7e.tar.gz
2009-07-22 Thomas Quinot <quinot@adacore.com>
* sem_util.adb, sem_ch10.adb: Minor reformatting * g-socket.adb (Receive_Socket, recvfrom(2) variant): Apply required special handling for the case of no data received and Item'First = Stream_Element_Offset'First. (Last_Index): New subprogram factoring the above special handling over the various locations where it is required. 2009-07-22 Arnaud Charlet <charlet@adacore.com> * gnat1drv.adb (Gnat1drv): Also disable division by zero and alignment checks in CodePeer_Mode. * gcc-interface/Make-lang.in: Update dependencies. 2009-07-22 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb: Improve error message. * sem_ch13.adb: If Ignore_Rep_Clauses is enabled, do a minimal analysis of an address representation clause. * freeze.adb (Freeze_Static_Object): An local imported object is legal if it has an address clause. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149926 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 302b4317306..da49f9ebd55 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -5094,9 +5094,13 @@ package body Freeze is
-- If the object that cannot be static is imported or exported,
-- then we give an error message saying that this object cannot
- -- be imported or exported.
+ -- be imported or exported. If it has an address clause it is
+ -- an overlay in the current partition and the static requirement
+ -- is not relevant.
- if Is_Imported (E) then
+ if Is_Imported (E)
+ and then No (Address_Clause (E))
+ then
Error_Msg_N
("& cannot be imported (local type is not constant)", E);