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

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

In addition a side mark, the following gives for all a-d :


$ cat z3.f90
program p
   implicit none
   integer, parameter :: wik = 1
   integer(wik), parameter :: a = -huge(1_wik) - 1_wik
   integer(wik) :: b = -huge(1_wik) - 1_wik
   integer(wik) :: c
   c = -huge(1_wik) - 1_wik
   associate (d => -huge(1_wik) - 1_wik)
      print *, a, b, c, d
   end associate
end


$ gfortran-11-20210328 -c z3.f90 -pedantic
z3.f90:4:33:

    4 |    integer(wik), parameter :: a = -huge(1_wik) - 1_wik
      |                                 1
Warning: Integer outside symmetric range implied by Standard Fortran at (1)
z3.f90:5:22:

    5 |    integer(wik) :: b = -huge(1_wik) - 1_wik
      |                      1
Warning: Integer outside symmetric range implied by Standard Fortran at (1)
z3.f90:7:7:

    7 |    c = -huge(1_wik) - 1_wik
      |       1
Warning: Integer outside symmetric range implied by Standard Fortran at (1)
z3.f90:8:19:

    8 |    associate (d => -huge(1_wik) - 1_wik)
      |                   1
Warning: Integer outside symmetric range implied by Standard Fortran at (1)

Reply via email to