From 82b337774c1429683681b3b4c084311b03a998fc Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 2 Jun 2018 09:37:31 +0000 Subject: [PATCH] discr53.ad[sb]: New test. * gnat.dg/discr53.ad[sb]: New test. * gnat.dg/discr53_pkg.ads: New helper. From-SVN: r261102 --- gcc/testsuite/ChangeLog | 10 +++++----- gcc/testsuite/gnat.dg/discr53.adb | 19 +++++++++++++++++++ gcc/testsuite/gnat.dg/discr53.ads | 16 ++++++++++++++++ gcc/testsuite/gnat.dg/discr53_pkg.ads | 5 +++++ 4 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gnat.dg/discr53.adb create mode 100644 gcc/testsuite/gnat.dg/discr53.ads create mode 100644 gcc/testsuite/gnat.dg/discr53_pkg.ads diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d023de36d58..e5c4d63b7f0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,9 @@ -2018-06-01 Carl Love +2018-06-02 Eric Botcazou -Commit 260294 on 2018-05-16 by Carl Love was supposed to add the -following files. + * gnat.dg/discr53.ad[sb]: New test. + * gnat.dg/discr53_pkg.ads: New helper. + +2018-06-01 Carl Love * gcc.target/powerpc/vsx-vector-6-be.p7.c: New test file. * gcc.target/powerpc/vsx-vector-6-be.p8.c: New test file. @@ -1092,8 +1094,6 @@ following files. 2018-05-16 Carl Love * gcc.target/powerpc/vsx-vector-6-be.c: Remove file. - * gcc.target/powerpc/vsx-vector-6-be.p7.c: New test file. - * gcc.target/powerpc/vsx-vector-6-be.p8.c: New test file. * gcc.target/powerpc/vsx-vector-6-le.c (dg-final): Update counts for xvcmpeqdp., xvcmpgtdp., xvcmpgedp., xxlxor, xvrdpi. diff --git a/gcc/testsuite/gnat.dg/discr53.adb b/gcc/testsuite/gnat.dg/discr53.adb new file mode 100644 index 00000000000..2e362a7fd29 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr53.adb @@ -0,0 +1,19 @@ +-- { dg-do compile } + +package body Discr53 is + + function F return Rec is + Data : Rec; + begin + return Data; + end; + + type Ptr is access Rec; + + procedure Proc is + Local : Ptr; + begin + Local := new Rec'(F); + end; + +end Discr53; diff --git a/gcc/testsuite/gnat.dg/discr53.ads b/gcc/testsuite/gnat.dg/discr53.ads new file mode 100644 index 00000000000..3fa9f0f4845 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr53.ads @@ -0,0 +1,16 @@ +with Discr53_Pkg; + +package Discr53 is + + type Rec (D : Boolean := False) is record + case D is + when True => S : String (1 .. Discr53_Pkg.Max); + when False => null; + end case; + end record; + + function F return Rec; + + procedure Proc; + +end Discr53; diff --git a/gcc/testsuite/gnat.dg/discr53_pkg.ads b/gcc/testsuite/gnat.dg/discr53_pkg.ads new file mode 100644 index 00000000000..d36e1ba2a12 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr53_pkg.ads @@ -0,0 +1,5 @@ +package Discr53_Pkg is + + function Max return Natural; + +end Discr53_Pkg;