https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92896

--- Comment #1 from G. Steinmetz <gs...@t-online.de> ---

With a plain array constructor :


$ cat z2.f90
program p
   print *, [integer :: 1, [integer(8) :: '2']]
end


$ gfortran-10-20191208 -c z2.f90 -fdec -fno-range-check
$ gfortran-10-20191208 -c z2.f90 -fdec
z2.f90:2:41:

    2 |    print *, [integer :: 1, [integer(8) :: '2']]
      |                                         1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1). This
check can be disabled with the option '-fno-range-check'
z2.f90:2:41:

    2 |    print *, [integer :: 1, [integer(8) :: '2']]
      |                                         1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1). This
check can be disabled with the option '-fno-range-check'

Reply via email to