From: Thomas Koenig Date: Sat, 23 Nov 2019 15:19:19 +0000 (+0000) Subject: Add test case for PR 92442. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cebf730684f709c2e39911be5f5b0c8967d78c0;p=gcc.git Add test case for PR 92442. 2019-11-23 Thomas Koenig PR fortran/92442 * gfortran.dg/bounds_check_21.f90: New test. From-SVN: r278647 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7687fcc4abf..b63a038182b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-11-23 Thomas Koenig + + PR fortran/92442 + * gfortran.dg/bounds_check_21.f90: New test. + 2019-11-23 Jan Hubicka * g++.dg/tree-ssa/pr53844.C: Drop -O2 from param name. diff --git a/gcc/testsuite/gfortran.dg/bounds_check_21.f90 b/gcc/testsuite/gfortran.dg/bounds_check_21.f90 new file mode 100644 index 00000000000..181d6230413 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bounds_check_21.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! { dg-options "-Warray-bounds -O2" } +! PR 92422 - this complained about an array subscript out of bounds. + +PROGRAM character_warning + + CHARACTER(len=16) :: word + + word = 'hi' + WRITE(*,*) word + +END PROGRAM character_warning