rt_gccstream/gcc/testsuite/gfortran.dg/array_constructor_type_17.f03

13 lines
295 B
Fortran

! { dg-do compile }
! { dg-options "-fno-range-check -Wconversion" }
! PR fortran/27997
!
! Range check on array-constructors with typespec.
PROGRAM test
IMPLICIT NONE
INTEGER(KIND=4) :: arr(1)
arr = (/ INTEGER(KIND=4) :: HUGE(0_8) /) ! { dg-warning "conversion from" }
END PROGRAM test