Bug ID: 84509
           Summary: STOP and PAUSE statements with -fdefault-integer-8 and
                    large stop code
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot
          Reporter: jb at gcc dot
                CC: marxin at gcc dot
  Target Milestone: ---

Consider the program

! compile with -fdefault-integer-8
program test
  stop 12345678901
end program test

Compiling this with -fdefault-integer-8 and running it results in

STOP -539222987

This is because the value is larger than 2**31-1 and is typecasted to an
INTEGER(kind=4) before calling the stop function in libgfortran.

The same happens for the ERROR STOP and PAUSE statements as well.

(Not sure this is actually worth fixing since with -fdefault-integer-8 we're
throwing standards conformance out of the window anyway)

Reply via email to