diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-20 12:07:47 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-20 12:07:47 +0000 |
commit | 003153a143b32d8cd6d6dd1c36be054238f64e75 (patch) | |
tree | 8ffac8bd587139a138acb67f0a618033856f2587 /gcc | |
parent | 7a635e9cb084245a896f9d75506fd095b613c4a3 (diff) | |
download | gcc-003153a143b32d8cd6d6dd1c36be054238f64e75.tar.gz |
2004-09-20 Robert Dewar <dewar@gnat.com>
PR ada/17540
* freeze.adb (Check_Address_Clause): Reset Is_Imported and Is_Public
if an address clause is present, since that means that the Import
should be ignored.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87755 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5f99b36d408..8c1632d23f9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2004-09-20 Robert Dewar <dewar@gnat.com> + + PR ada/17540 + + * freeze.adb (Check_Address_Clause): Reset Is_Imported and Is_Public + if an address clause is present, since that means that the Import + should be ignored. + 2004-09-20 Arnaud Charlet <charlet@act-europe.fr> * 5tsystem.ads: Removed, no longer used. diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index cee69c47762..e58a987d899 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -82,7 +82,9 @@ package body Freeze is procedure Check_Address_Clause (E : Entity_Id); -- Apply legality checks to address clauses for object declarations, - -- at the point the object is frozen. + -- at the point the object is frozen. Also deals with cancelling effect + -- of Import pragma which has no effect (other than to eliminate any + -- implicit initialization) if an address clause is present. procedure Check_Strict_Alignment (E : Entity_Id); -- E is a base type. If E is tagged or has a component that is aliased @@ -497,6 +499,11 @@ package body Freeze is then Warn_Overlay (Expr, Typ, Name (Addr)); end if; + + -- Cancel effect of any Import pragma + + Set_Is_Imported (E, False); + Set_Is_Public (E, False); end if; end Check_Address_Clause; |