From 87be4cecfc6e42390303be1ca92bc8bc587b0bd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20K=C3=B6nig?= Date: Sun, 12 Apr 2020 17:02:08 +0200 Subject: [PATCH] Added a test case from a PR that was fixed by something else. 2020-04-12 Thomas Koenig PR fortran/94091 * gfortran.dg/char_length_22.f90: New test. Committed ChangeLog entry. --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/char_length_22.f90 | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/char_length_22.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a5e8e6b3c0c..1343b8bec06 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-12 Thomas Koenig + + PR fortran/94091 + * gfortran.dg/char_length_22.f90: New test. + 2020-04-12 Iain Sandoe * gcc.target/i386/indirect-thunk-1.c: Adjust for fno-common diff --git a/gcc/testsuite/gfortran.dg/char_length_22.f90 b/gcc/testsuite/gfortran.dg/char_length_22.f90 new file mode 100644 index 00000000000..7df8546ba7a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/char_length_22.f90 @@ -0,0 +1,11 @@ +! { dg-do compile } +! { dg-options "-O -Wall" } +! PR 94091 - this used to give a bogus warning. +! Test case by "MikeS". +program tester + character(50) cname,fred + fred='1234567890123456789012345678901234567890' ! 40 characters + kk=len_trim(fred) + cname=fred(5:kk) + print *,kk,cname +end program tester -- 2.30.2