aarch64: Add vector floating point extend pattern [PR113880, PR113869]
[official-gcc.git] / gcc / testsuite / gfortran.dg / data_array_7.f90
blob56cd6ad3e23e62c45f6b504ecba00009a8af0466
1 ! { dg-do run }
3 ! Checking for "The new features of Fortran 2008" feature 5.6
5 implicit none
6 integer :: a(6)
7 integer :: b(6)
8 integer(kind=4) :: i
10 ! Fortran 2008: Subscripts in a data statement can be any constant expression
11 data a(kind("foo")) / 1 /
12 data a(sum([1, 2, 3]) / 3) / 2 /
13 data a(len("foo")) / 3 /
14 data a(kind(i)) / 4 /
15 data a(int(7.0 * atan(1.0)):6) / 5, 6 /
17 ! Fortran 2008: nested implied-do limits in a data statement can be any constant expression
18 data (b(i), i = kind("foo"), sum([-1, 1, 2])) / 1, 2 /
19 data (b(i), i = len("foo"), kind(i)) / 3, 4 /
20 data (b(i), i = int(7.0 * atan(1.0)), 6) / 5, 6 /
22 ! Check that data was correctly filled
23 if (any(a /= [(i, i = 1, 6)])) stop 1
24 if (any(b /= [(i, i = 1, 6)])) stop 1
26 end