summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/discr28.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/discr28.adb')
-rw-r--r--gcc/testsuite/gnat.dg/discr28.adb25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/discr28.adb b/gcc/testsuite/gnat.dg/discr28.adb
new file mode 100644
index 00000000000..97ca8cd68b7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr28.adb
@@ -0,0 +1,25 @@
+-- { dg-do compile }
+
+package body Discr28 is
+
+ procedure Dummy (E : Rec) is
+ begin
+ null;
+ end;
+
+ function F return Rec is
+ begin
+ return Default_Rec;
+ end;
+
+ procedure Proc1 is
+ begin
+ Dummy (F);
+ end;
+
+ procedure Proc2 is
+ begin
+ Dummy (F);
+ end;
+
+end Discr28;