* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
PLUS_EXPR in the expression of a renaming.
From-SVN: r237360
+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
&& !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
--- /dev/null
+-- { 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;
--- /dev/null
+package Renaming10 is
+
+ type Rec is record
+ Position : Natural;
+ end record;
+
+ function F (Input : Rec) return Natural;
+
+end Renaming10;