aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2005-08-03 01:58:30 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2005-08-02 21:58:30 -0400
commit776928b46c9ac74faa89bfe1b4358b84e9e3ad8e (patch)
tree552430b2953199ccd1ca0dc79159ed705f741ddb
parentc2fee3de3b9b15b903841cc1d6679a627ccbbebe (diff)
downloadgcc-776928b46c9ac74faa89bfe1b4358b84e9e3ad8e.zip
gcc-776928b46c9ac74faa89bfe1b4358b84e9e3ad8e.tar.gz
gcc-776928b46c9ac74faa89bfe1b4358b84e9e3ad8e.tar.bz2
constant_substring.f: New test.
* gfortran.dg/constant_substring.f: New test. * gfortran.dg/pr22491.f: New test. From-SVN: r102677
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/constant_substring.f11
-rw-r--r--gcc/testsuite/gfortran.dg/pr22491.f11
3 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b866934..4db6413 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..c3aff48
--- /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 0000000..1cd3557
--- /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
+