aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dependency_51.f90
blob: 6cd6af91221e2920bd82ab194b3489205893bb19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do  run }
! PR 83224 - dependency mishandling with an array constructor
! Original test case by Urban Jost
program dusty_corner
  implicit none
  character(len=:),allocatable :: words(:)
  integer :: n

  words=[character(len=3) :: 'one', 'two']
  n = 5
  words=[character(len=n) :: words, 'three']
  if (any(words /= [ "one  ", "two  ", "three"])) STOP 1

end program dusty_corner