gcc/testsuite/gfortran.fortran-torture/execute/data_2.f90
raw| 1 | ! Check more array variants of the data statement |
| 2 | program data_2 |
| 3 | implicit none |
| 4 | type t |
| 5 | integer i |
| 6 | end type t |
| 7 | integer, dimension(3) :: a |
| 8 | type (t), dimension(3) :: b |
| 9 | integer, dimension(2,2) :: c |
| 10 | data a(:), b%i /1, 2, 3, 4, 5, 6/ |
| 11 | data c(1, :), c(2, :) /7, 8, 9, 10/ |
| 12 | |
| 13 | if (any (a .ne. (/1, 2, 3/))) STOP 1 |
| 14 | if (any (b%i .ne. (/4, 5, 6/))) STOP 2 |
| 15 | if ((any (c(1, :) .ne. (/7, 8/))) & |
| 16 | .or. (any (c(2,:) .ne. (/9, 10/)))) STOP 3 |
| 17 | end program |