Commit bb9be5eb by Robert Dewar Committed by Arnaud Charlet

re PR ada/17540 (Duplicate symbols while building Ada)

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.

From-SVN: r87755
parent d4a9b3a3
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> 2004-09-20 Arnaud Charlet <charlet@act-europe.fr>
* 5tsystem.ads: Removed, no longer used. * 5tsystem.ads: Removed, no longer used.
......
...@@ -82,7 +82,9 @@ package body Freeze is ...@@ -82,7 +82,9 @@ package body Freeze is
procedure Check_Address_Clause (E : Entity_Id); procedure Check_Address_Clause (E : Entity_Id);
-- Apply legality checks to address clauses for object declarations, -- 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); procedure Check_Strict_Alignment (E : Entity_Id);
-- E is a base type. If E is tagged or has a component that is aliased -- E is a base type. If E is tagged or has a component that is aliased
...@@ -497,6 +499,11 @@ package body Freeze is ...@@ -497,6 +499,11 @@ package body Freeze is
then then
Warn_Overlay (Expr, Typ, Name (Addr)); Warn_Overlay (Expr, Typ, Name (Addr));
end if; end if;
-- Cancel effect of any Import pragma
Set_Is_Imported (E, False);
Set_Is_Public (E, False);
end if; end if;
end Check_Address_Clause; end Check_Address_Clause;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment