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

            Bug ID: 61499
           Summary: Internal read of negative integer broken in 4.9.0 on
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: krefson at gmail dot com

Created attachment 32933
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32933&action=edit
Source for testcase

The attached file compiles bug gives erroneous results with fortran 4.9.0 and
4.9.1

gfortran -static-libgfortran -o internal2 internal2.f90
/usr/bin/ld: warning: -z ignore ignored.
/usr/bin/ld: warning: -z record ignored.
[kr@kohn gfortran-4.9.1]$ ./internal2
 Error: Bad integer for item 2 in list input

[kr@kohn gfortran-4.9.1]$ gfortran --version
GNU Fortran (GCC) 4.9.1 20140611 (prerelease)

Expected output (4.8.2)

 ./internal2.4.8.2
           1           1          -1           1          -1           1

Note that this is closely related to bug #61173. That bug is fixed in the above
version, but internal reads of integer data are still failing as in this case.

Reply via email to