aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas König <tkoenig@gcc.gnu.org>2020-04-12 17:02:08 +0200
committerThomas König <tkoenig@gcc.gnu.org>2020-04-12 17:05:34 +0200
commit87be4cecfc6e42390303be1ca92bc8bc587b0bd6 (patch)
tree4becd9c376154b0c0e21d73ef1db8f5177669183
parentce6437aa9b2f468a3414e744acb84cdeb75f5316 (diff)
downloadgcc-87be4cecfc6e42390303be1ca92bc8bc587b0bd6.zip
gcc-87be4cecfc6e42390303be1ca92bc8bc587b0bd6.tar.gz
gcc-87be4cecfc6e42390303be1ca92bc8bc587b0bd6.tar.bz2
Added a test case from a PR that was fixed by something else.
2020-04-12 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/94091 * gfortran.dg/char_length_22.f90: New test. Committed ChangeLog entry.
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/char_length_22.f9011
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a5e8e6b..1343b8b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/94091
+ * gfortran.dg/char_length_22.f90: New test.
+
2020-04-12 Iain Sandoe <iain@sandoe.co.uk>
* 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 0000000..7df8546
--- /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