+2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt78.ad[sb]: New test.
+
2019-05-23 Iain Sandoe <iain@sandoe.co.uk>
PR rtl-optimisation/64895
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+package body Opt78 is
+
+ procedure Proc (P : UC; Msg : String) is
+ Default : UC := (1, "!");
+ begin
+ if P = Default then
+ raise Program_Error;
+ else
+ raise Constraint_Error;
+ end if;
+ end;
+
+end Opt78;
--- /dev/null
+package Opt78 is
+
+ subtype Reasonable is Integer range 1..10;
+
+ type UC (D: Reasonable := 2) is record
+ S: String (1 .. D) := "Hi";
+ end record;
+
+ type AUC is access all UC;
+
+ procedure Proc (P : UC; Msg : String);
+
+end Opt78;