Commit a962b0a1 by Eric Botcazou

decl.c (gnat_to_gnu_entity): Do not set force_global for imported subprograms.

	* gcc-interface/decl.c (gnat_to_gnu_entity): Do not set force_global
	for imported subprograms.

From-SVN: r146469
parent 2f283818
2009-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not set force_global
for imported subprograms.
2009-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not make
constant objects covered by 13.3(19) volatile.
......@@ -332,13 +332,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
another compilation unit) public entities, show we are at global level
for the purpose of computing scopes. Don't do this for components or
discriminants since the relevant test is whether or not the record is
being defined. But do this for Imported functions or procedures in
all cases. */
if ((!definition && Is_Public (gnat_entity)
&& !Is_Statically_Allocated (gnat_entity)
&& kind != E_Discriminant && kind != E_Component)
|| (Is_Imported (gnat_entity)
&& (kind == E_Function || kind == E_Procedure)))
being defined. */
if (!definition
&& Is_Public (gnat_entity)
&& !Is_Statically_Allocated (gnat_entity)
&& kind != E_Component
&& kind != E_Discriminant)
force_global++, this_global = true;
/* Handle any attributes directly attached to the entity. */
......
2009-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/import1.ad[sb]: New test.
2009-04-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
* objc/execute/exceptions/handler-1.m: For the NeXT runtime, just return 0.
* objc/execute/exceptions/handler-1.m: For the NeXT runtime, just
return 0.
2009-04-20 Tobias Burnus <burnus@net-b.de>
......
-- { dg-do compile }
-- { dg-options "-g" }
package body Import1 is
procedure Create (Bounds : Arr) is
type Bound_Array is array (Bounds'Range) of Integer;
procedure Proc (Ptr : access Bound_Array);
pragma Import (C, Proc);
Temp : aliased Bound_Array;
begin
Proc (Temp'Access);
end;
end Import1;
package Import1 is
type Arr is array (Positive range <>) of Integer;
procedure Create (Bounds : Arr);
end Import1;
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