aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/opt55.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/opt55.adb')
-rw-r--r--gcc/testsuite/gnat.dg/opt55.adb20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/opt55.adb b/gcc/testsuite/gnat.dg/opt55.adb
new file mode 100644
index 00000000000..70f486b2ee3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt55.adb
@@ -0,0 +1,20 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+package body Opt55 is
+
+ function Cond (B : Boolean; If_True, If_False : Date) return Date is
+ begin
+ if B then
+ return If_True;
+ else
+ return If_False;
+ end if;
+ end;
+
+ function F (C : Rec2; B : Boolean) return Date is
+ begin
+ return Cond (B, C.D1, C.D2);
+ end;
+
+end Opt55;