public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-9469] testsuite: Enrich tests with variants failing on the branch.
@ 2022-01-16 21:20 Mikael Morin
  0 siblings, 0 replies; only message in thread
From: Mikael Morin @ 2022-01-16 21:20 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:024fd4fb5a1ba742242eec84149f159518444ae3

commit r11-9469-g024fd4fb5a1ba742242eec84149f159518444ae3
Author: Mikael Morin <mikael@gcc.gnu.org>
Date:   Sun Jan 16 18:33:36 2022 +0100

    testsuite: Enrich tests with variants failing on the branch.
    
    Backporting the fix for pr103789 on the 11 branch revealed a lack of test
    coverage for the tests provided with that fix.  Indeed, the tests use the KIND
    argument of the respective intrinsics only with keyword arguments.
    This adds variants with non-keyword arguments.
    
    The tests enriched this way fail on the branch if the fix is cherry-picked
    straightforwardly.  The fix will have to be tweaked slightly there.
    
            PR fortran/103789
            PR fortran/87711
            PR fortran/97896
    
    gcc/testsuite/ChangeLog:
    
            * gfortran.dg/maskl_1.f90: Enrich test with usages of MASKL with
            a non-keyword KIND argument.
            * gfortran.dg/maskr_1.f90: Same for MASKR.
            * gfortran.dg/scan_3.f90: Same for SCAN.
            * gfortran.dg/verify_3.f90: Same for VERIFY.
    
    (cherry picked from commit 15630e6e9eb019477d1fc5c0966b43979e18ae18)

Diff:
---
 gcc/testsuite/gfortran.dg/maskl_1.f90  | 3 ++-
 gcc/testsuite/gfortran.dg/maskr_1.f90  | 3 ++-
 gcc/testsuite/gfortran.dg/scan_3.f90   | 5 ++++-
 gcc/testsuite/gfortran.dg/verify_3.f90 | 5 ++++-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/maskl_1.f90 b/gcc/testsuite/gfortran.dg/maskl_1.f90
index 9e25c2c9cdc..56350e269da 100644
--- a/gcc/testsuite/gfortran.dg/maskl_1.f90
+++ b/gcc/testsuite/gfortran.dg/maskl_1.f90
@@ -4,7 +4,8 @@
 ! Check the absence of ICE when generating calls to MASKL with a KIND argument.
 
 program p
-   integer :: z(2), y(2)
+   integer :: z(2), y(2), x(2)
    y = [1, 13]
    z = maskl(y, kind=4) + 1
+   x = maskl(y,      4) + 1
 end program p
diff --git a/gcc/testsuite/gfortran.dg/maskr_1.f90 b/gcc/testsuite/gfortran.dg/maskr_1.f90
index ebfd3dbba33..f8ccdd11ab3 100644
--- a/gcc/testsuite/gfortran.dg/maskr_1.f90
+++ b/gcc/testsuite/gfortran.dg/maskr_1.f90
@@ -4,7 +4,8 @@
 ! Check the absence of ICE when generating calls to MASKR with a KIND argument.
 
 program p
-   integer :: z(2), y(2)
+   integer :: z(2), y(2), x(2)
    y = [1, 13]
    z = maskr(y, kind=4) + 1
+   x = maskr(y,      4) + 1
 end program p
diff --git a/gcc/testsuite/gfortran.dg/scan_3.f90 b/gcc/testsuite/gfortran.dg/scan_3.f90
index 80262ae2167..2a9ed080957 100644
--- a/gcc/testsuite/gfortran.dg/scan_3.f90
+++ b/gcc/testsuite/gfortran.dg/scan_3.f90
@@ -5,7 +5,10 @@
 
 program p
    character(len=10) :: y(2)
-   integer :: z(2)
+   integer :: z(2), x(2), w(2), v(2)
    y = ['abc', 'def']
    z = scan(y, 'e', kind=4) + 1
+   x = scan(y, 'e', back=.false., kind=4) + 1
+   w = scan(y, 'e',      .false., kind=4) + 1
+   v = scan(y, 'e',      .false.,      4) + 1
 end program p
diff --git a/gcc/testsuite/gfortran.dg/verify_3.f90 b/gcc/testsuite/gfortran.dg/verify_3.f90
index f01e24e199e..c8b26b70614 100644
--- a/gcc/testsuite/gfortran.dg/verify_3.f90
+++ b/gcc/testsuite/gfortran.dg/verify_3.f90
@@ -5,7 +5,10 @@
 
 program p
    character(len=10) :: y(2)
-   integer :: z(2)
+   integer :: z(2), x(2), w(2), v(2)
    y = ['abc', 'def']
    z = verify(y, 'e', kind=4) + 1
+   x = verify(y, 'e', back=.false., kind=4) + 1
+   w = verify(y, 'e',      .false., kind=4) + 1
+   x = verify(y, 'e',      .false.,      4) + 1
 end program p


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

only message in thread, other threads:[~2022-01-16 21:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 21:20 [gcc r11-9469] testsuite: Enrich tests with variants failing on the branch Mikael Morin

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).