diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_type_3.f03')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_type_3.f03 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_type_3.f03 b/gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_type_3.f03 new file mode 100644 index 000000000..bebaea5c5 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_type_3.f03 @@ -0,0 +1,16 @@ +! { dg-do run } +! +! PR fortran/27997 +! +! Test empty array constructor with typespec. +! +PROGRAM test + IMPLICIT NONE + INTEGER :: array(2) + + array = (/ 5, [INTEGER ::], 6 /) + + IF (array(1) /= 5 .OR. array(2) /= 6) THEN + CALL abort() + END IF +END PROGRAM test |