aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr98017.f90
blob: ab60407bf1d57943bb8c17a84b57264171d43b5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do run }
! PR98017 - [8/9/10/11 Regression] Suspected regression using PACK

program p
  implicit none
  character(*), parameter :: s(1) = ['abc()']
  character(*), parameter :: t(*) = s(:)(:1)
  if (len (pack (s, s(:)(:1)  == 'a')) /= len (s)) stop 1
  if (any (pack (s, s(:)(:1)  == 'a')  /=      s)) stop 2
  if (len (pack (s,         t == 'a')) /= len (s)) stop 3
  if (any (pack (s,         t == 'a')  /=      s)) stop 4
  if (len (pack (s(:)(1:5), t == 'a')) /= len (s)) stop 5
  if (any (pack (s(:)(1:5), t == 'a')  /=      s)) stop 6
end