public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] Add testcase to gnat.dg testsuite
@ 2019-05-23  9:52 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2019-05-23  9:52 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

This adds the Ada testcase that detected a since then fixed regression on the 
8 branch introduced by a backport.

Tested on x86_64-suse-linux, applied on mainline, 9 and 8 branches.


2019-05-23  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/opt78.ad[sb]: New test.

-- 
Eric Botcazou

[-- Attachment #2: opt78.adb --]
[-- Type: text/x-adasrc, Size: 287 bytes --]

-- { 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;

[-- Attachment #3: opt78.ads --]
[-- Type: text/x-adasrc, Size: 242 bytes --]

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-23  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23  9:52 [testsuite] Add testcase to gnat.dg testsuite Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).