summaryrefslogtreecommitdiff
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 9a22ff7bcf8..8a48f9ca78d 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -5100,10 +5100,16 @@ package body Freeze is
-- issue an error message saying that this object cannot 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.
+ -- Do not issue any error message when ignoring rep clauses.
- if Is_Imported (E) and then No (Address_Clause (E)) then
- Error_Msg_N
- ("& cannot be imported (local type is not constant)", E);
+ if Ignore_Rep_Clauses then
+ null;
+
+ elsif Is_Imported (E) then
+ if No (Address_Clause (E)) then
+ Error_Msg_N
+ ("& cannot be imported (local type is not constant)", E);
+ end if;
-- Otherwise must be exported, something is wrong if compiler
-- is marking something as statically allocated which cannot be).