This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16579] New: gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255
- From: "billingd at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jul 2004 00:25:17 -0000
- Subject: [Bug fortran/16579] New: gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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