| 1 |
! { dg-do run } |
| 2 |
! { dg-options "-std=gnu -fdump-tree-original" } |
| 3 |
! PR93340 - issues with substrings in initializers |
| 4 |
|
| 5 |
program p |
| 6 |
implicit none |
| 7 |
integer, parameter :: m = 1 |
| 8 |
character b(2) /'a', 'b' (1:1)/ |
| 9 |
character c(2) /'a', 'bc' (1:1)/ |
| 10 |
character d(2) /'a', 'bxyz'(m:m)/ |
| 11 |
character e(2) |
| 12 |
character f(2) |
| 13 |
data e /'a', 'bxyz'( :1)/ |
| 14 |
data f /'a', 'xyzb'(4:4)/ |
| 15 |
character :: g(2) = [ 'a', 'b' (1:1) ] |
| 16 |
character :: h(2) = [ 'a', 'bc'(1:1) ] |
| 17 |
character :: k(2) = [ 'a', 'bc'(m:1) ] |
| 18 |
if (b(2) /= "b") stop 1 |
| 19 |
if (c(2) /= "b") stop 2 |
| 20 |
if (d(2) /= "b") stop 3 |
| 21 |
if (e(2) /= "b") stop 4 |
| 22 |
if (f(2) /= "b") stop 5 |
| 23 |
if (g(2) /= "b") stop 6 |
| 24 |
if (h(2) /= "b") stop 7 |
| 25 |
if (k(2) /= "b") stop 8 |
| 26 |
end |
| 27 |
|
| 28 |
! { dg-final { scan-tree-dump-times "xyz" 0 "original" } } |