summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/renaming10.adb
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-13 08:00:17 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-13 08:00:17 +0000
commit5b7401b85f4519402d473ac91ee27d7b7f3d5dc2 (patch)
treea050bf546eea4542eff56409c4ae815fac2beffd /gcc/testsuite/gnat.dg/renaming10.adb
parent1c93151c7c07c0c63b8f4de1747cc631ec065d05 (diff)
downloadgcc-5b7401b85f4519402d473ac91ee27d7b7f3d5dc2.tar.gz
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
PLUS_EXPR in the expression of a renaming. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237360 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/renaming10.adb')
-rw-r--r--gcc/testsuite/gnat.dg/renaming10.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/renaming10.adb b/gcc/testsuite/gnat.dg/renaming10.adb
new file mode 100644
index 00000000000..07d4312b060
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/renaming10.adb
@@ -0,0 +1,12 @@
+-- { 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;