aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-07-22 12:39:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-22 12:39:30 +0200
commit9d0c37619fe75c702cb4892e944290ae0aa21f98 (patch)
treec5a8963e970a6abe500cd73f739c2b706386f685 /gcc/ada/sem_ch13.adb
parentf625663199e1b11f1e7e90ca7b47e53bbbc94450 (diff)
downloadgcc-9d0c37619fe75c702cb4892e944290ae0aa21f98.zip
gcc-9d0c37619fe75c702cb4892e944290ae0aa21f98.tar.gz
gcc-9d0c37619fe75c702cb4892e944290ae0aa21f98.tar.bz2
[multiple changes]
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. From-SVN: r149926
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 059abe3..89ad845 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -675,8 +675,7 @@ package body Sem_Ch13 is
-- affect legality (except possibly to be rejected because they
-- are incompatible with the compilation target).
- when Attribute_Address |
- Attribute_Alignment |
+ when Attribute_Alignment |
Attribute_Bit_Order |
Attribute_Component_Size |
Attribute_Machine_Radix |
@@ -798,6 +797,20 @@ package body Sem_Ch13 is
Analyze_And_Resolve (Expr, RTE (RE_Address));
+ -- Even when ignoring rep clauses we need to indicate that the
+ -- entity has an address clause and thus it is legal to declare
+ -- it imported.
+
+ if Ignore_Rep_Clauses then
+ if Ekind (U_Ent) = E_Variable
+ or else Ekind (U_Ent) = E_Constant
+ then
+ Record_Rep_Item (U_Ent, N);
+ end if;
+
+ return;
+ end if;
+
if Present (Address_Clause (U_Ent)) then
Error_Msg_N ("address already given for &", Nam);