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

            Bug ID: 96911
           Summary: bug with Intrinsic shifta/shiftl/shiftr
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhen...@compiler-dev.com
  Target Milestone: ---

Dealing with Intrinsic shifta/shiftl/shiftr, gfortran refuses proper numbers in
the code below and throws "Error: Integer too big for its kind". 

The code is checked with ifort.

-------code----------
program test
  print *, shifta(-128_1, 1);
  print *, shifta(-32768_2, 1);
  print *, shifta(-2147483648_4, 1);
  print *, shifta(-9223372036854775808_8, 1);

  print *, shiftl(-128_1, 1);
  print *, shiftl(-32768_2, 1);
  print *, shiftl(-2147483648_4, 1);
  print *, shiftl(-9223372036854775808_8, 1);

  print *, shiftr(-128_1, 1);
  print *, shiftr(-32768_2, 1);
  print *, shiftr(-2147483648_4, 1);
  print *, shiftr(-9223372036854775808_8, 1);

end
----------------------

Reply via email to