Commit 42e77cbc by Eric Botcazou Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): Deal with PLUS_EXPR in the expression of a renaming.

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
	PLUS_EXPR in the expression of a renaming.

From-SVN: r237360
parent 7474dcc1
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
PLUS_EXPR in the expression of a renaming.
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
with calls to malloc.
......
......@@ -1003,6 +1003,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
&& !call_is_atomic_load (inner))
|| TREE_CODE (inner) == ADDR_EXPR
|| TREE_CODE (inner) == NULL_EXPR
|| TREE_CODE (inner) == PLUS_EXPR
|| TREE_CODE (inner) == CONSTRUCTOR
|| CONSTANT_CLASS_P (inner)
/* We need to detect the case where a temporary is created to
......
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/renaming10.ad[sb]: New test.
2016-06-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70673
......
-- { dg-do compile }
package body Renaming10 is
function F (Input : Rec) return Natural is
Position : Natural renames Input.Position;
Index : Natural renames Natural'Succ(Position);
begin
return Index;
end;
end Renaming10;
package Renaming10 is
type Rec is record
Position : Natural;
end record;
function F (Input : Rec) return Natural;
end Renaming10;
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