This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/16579] New: gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255


Test g77.f-torture/execute/20010610.f fails with gfortran.
Looks like a signed vs unsigned char issue.

The test is:

      DO I = 0, 255
         IF (ICHAR(CHAR(I)) .NE. I) CALL ABORT
      ENDDO
      END

It fails for I >= 128

ICHAR(CHAR(128)) = -128
ICHAR(CHAR(129)) = -127
 ...
ICHAR(CHAR(255)) = -1

-- 
           Summary: gfortran: (ICHAR(CHAR(I)) .NE. I)  when 128 <= I <= 255
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: billingd at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16579


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]