summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/constant_substring.f
blob: 4ca11bc160a8c1ba0cbb7193c2f5905a3915eaa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
! Simplify constant substring
! { dg-do run }
! { dg-options "-std=legacy" }
!
      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