File: substr_9.f90

package info (click to toggle)
gcc-arm-none-eabi 15%3A14.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,099,328 kB
  • sloc: cpp: 3,627,108; ansic: 2,571,498; ada: 834,230; f90: 235,082; makefile: 79,231; asm: 74,984; xml: 51,692; exp: 39,736; sh: 33,298; objc: 15,629; python: 15,069; fortran: 14,429; pascal: 7,003; awk: 5,070; perl: 3,106; ml: 285; lisp: 253; lex: 204; haskell: 135
file content (28 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
! { dg-do run }
! { dg-options "-std=gnu -fdump-tree-original" }
! PR93340 - issues with substrings in initializers

program p
  implicit none
  integer, parameter :: m = 1
  character b(2) /'a', 'b'   (1:1)/
  character c(2) /'a', 'bc'  (1:1)/
  character d(2) /'a', 'bxyz'(m:m)/
  character e(2)
  character f(2)
  data e /'a', 'bxyz'( :1)/
  data f /'a', 'xyzb'(4:4)/
  character :: g(2) = [ 'a', 'b' (1:1) ]
  character :: h(2) = [ 'a', 'bc'(1:1) ]
  character :: k(2) = [ 'a', 'bc'(m:1) ]
  if (b(2) /= "b") stop 1
  if (c(2) /= "b") stop 2
  if (d(2) /= "b") stop 3
  if (e(2) /= "b") stop 4
  if (f(2) /= "b") stop 5
  if (g(2) /= "b") stop 6
  if (h(2) /= "b") stop 7
  if (k(2) /= "b") stop 8
end

! { dg-final { scan-tree-dump-times "xyz" 0 "original" } }