From: David Edelsohn Date: Wed, 3 Aug 2005 01:58:30 +0000 (+0000) Subject: constant_substring.f: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=776928b46c9ac74faa89bfe1b4358b84e9e3ad8e;p=gcc.git constant_substring.f: New test. * gfortran.dg/constant_substring.f: New test. * gfortran.dg/pr22491.f: New test. From-SVN: r102677 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b8669340335..4db6413d193 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-08-02 David Edelsohn + + * gfortran.dg/constant_substring.f: New test. + * gfortran.dg/pr22491.f: New test. + 2005-08-02 Jan Hubicka * update-threading.c: Replace by the proper one. diff --git a/gcc/testsuite/gfortran.dg/constant_substring.f b/gcc/testsuite/gfortran.dg/constant_substring.f new file mode 100644 index 00000000000..c3aff4848e1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/constant_substring.f @@ -0,0 +1,11 @@ +! Simplify constant substring +! { dg-do run } + character*2 a + character*4 b + character*6 c + parameter (a="12") + parameter (b = a(1:2)) + write (c,'("#",A,"#")') b + if (c .ne. '#12 #') call abort + end + diff --git a/gcc/testsuite/gfortran.dg/pr22491.f b/gcc/testsuite/gfortran.dg/pr22491.f new file mode 100644 index 00000000000..1cd35577022 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr22491.f @@ -0,0 +1,11 @@ +! PR fortran/21730 +! { dg-do run } + character*2 a (1) + character*4 b (1) + character*6 c + parameter (a="12") + parameter (b = a) + write (c,'("#",A,"#")') b + if (c .ne. '#12 #') call abort + end +