constant_substring.f: New test.
authorDavid Edelsohn <edelsohn@gnu.org>
Wed, 3 Aug 2005 01:58:30 +0000 (01:58 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 3 Aug 2005 01:58:30 +0000 (21:58 -0400)
        * gfortran.dg/constant_substring.f: New test.
        * gfortran.dg/pr22491.f: New test.

From-SVN: r102677

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/constant_substring.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr22491.f [new file with mode: 0644]

index b8669340335700c7af645660512d8b66e423ebc4..4db6413d193cd0dc0cd40febf78a33389aa39b9c 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-02  David Edelsohn  <edelsohn@gnu.org>
+
+       * gfortran.dg/constant_substring.f: New test.
+       * gfortran.dg/pr22491.f: New test.
+
 2005-08-02  Jan Hubicka  <jh@suse.cz>
 
        * 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 (file)
index 0000000..c3aff48
--- /dev/null
@@ -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 (file)
index 0000000..1cd3557
--- /dev/null
@@ -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
+