summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/constant_substring.f
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-03 01:58:30 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-03 01:58:30 +0000
commit8d47c4d75dd9f50a70629aa7880776c04237eb7f (patch)
tree552430b2953199ccd1ca0dc79159ed705f741ddb /gcc/testsuite/gfortran.dg/constant_substring.f
parenteb4df85f06a36697979cce1b89f996872bddd014 (diff)
downloadgcc-8d47c4d75dd9f50a70629aa7880776c04237eb7f.tar.gz
* gfortran.dg/constant_substring.f: New test.
* gfortran.dg/pr22491.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/constant_substring.f')
-rw-r--r--gcc/testsuite/gfortran.dg/constant_substring.f11
1 files changed, 11 insertions, 0 deletions
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
+