Commit f1bc6414 by Eric Botcazou Committed by Eric Botcazou

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: r258412
parent 7b602c4d
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-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
......
......@@ -4082,6 +4082,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));
......
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 Jason Merrill <jason@redhat.com>
Paolo Carlini <paolo.carlini@oracle.com>
......
-- { dg-do run }
with Prot3_Pkg; use Prot3_Pkg;
procedure Prot3 is
begin
P.Foo (4);
end;
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;
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;
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