trans.c (node_has_volatile_full_access): Consider only entities for objects.
* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>: Consider only entities for objects. From-SVN: r258413
This commit is contained in:
parent
041bc6e332
commit
faaab12a7b
|
@ -1,3 +1,8 @@
|
|||
2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
|
||||
Consider only entities for objects.
|
||||
|
||||
2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/trans.c (convert_with_check): Fix typo in the condition
|
||||
|
|
|
@ -4059,6 +4059,8 @@ node_has_volatile_full_access (Node_Id gnat_node)
|
|||
case N_Identifier:
|
||||
case N_Expanded_Name:
|
||||
gnat_entity = Entity (gnat_node);
|
||||
if (!Is_Object (gnat_entity))
|
||||
break;
|
||||
return Is_Volatile_Full_Access (gnat_entity)
|
||||
|| Is_Volatile_Full_Access (Etype (gnat_entity));
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/prot3.adb: New test.
|
||||
* gnat.dg/prot3_pkg.ad[sb]: New helper.
|
||||
|
||||
2018-03-09 Kugan Vivekanandarajah <kuganv@linaro.org>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
-- { dg-do run }
|
||||
|
||||
with Prot3_Pkg; use Prot3_Pkg;
|
||||
|
||||
procedure Prot3 is
|
||||
begin
|
||||
P.Foo (4);
|
||||
end;
|
|
@ -0,0 +1,17 @@
|
|||
package body Prot3_Pkg is
|
||||
|
||||
protected body Prot is
|
||||
function Fn (J : Short_Integer) return Rec
|
||||
is
|
||||
begin
|
||||
return (V1 => J * J,
|
||||
V2 => J);
|
||||
end;
|
||||
|
||||
procedure Foo (J : Short_Integer) is
|
||||
begin
|
||||
Val := Fn (J);
|
||||
end;
|
||||
end Prot;
|
||||
|
||||
end Prot3_Pkg;
|
|
@ -0,0 +1,16 @@
|
|||
package Prot3_Pkg is
|
||||
|
||||
type Rec is record
|
||||
V1 : Short_Integer;
|
||||
V2 : Short_Integer;
|
||||
end record with Volatile_Full_Access;
|
||||
|
||||
protected type Prot is
|
||||
procedure Foo (J : Short_Integer);
|
||||
private
|
||||
Val : Rec;
|
||||
end Prot;
|
||||
|
||||
P : Prot;
|
||||
|
||||
end Prot3_Pkg;
|
Loading…
Reference in New Issue