This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/16704] New: Letter F not understood as a radix-16 digit in READ statement.
- From: "lei at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2004 10:49:57 -0000
- Subject: [Bug libfortran/16704] New: Letter F not understood as a radix-16 digit in READ statement.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Letters A-E are understood as base-16 digits, but not F or f.
program main
character*2 buf
buf = 'ff'
read (buf, '(Z2.2)'), i
if (i.ne.255) call abort
end
% a.out
Fortran runtime error: Bad value during integer read
FIX FOLLOWS:
[lei@roadrunner io]% cvs diff -cp read.c
Index: read.c
===================================================================
RCS file: /cvsroot/gcc/gcc/libgfortran/io/read.c,v
retrieving revision 1.2
diff -c -p -r1.2 read.c
*** read.c 13 May 2004 06:41:02 -0000 1.2
--- read.c 25 Jul 2004 10:47:13 -0000
*************** read_radix (fnode * f, char *dest, int l
*** 526,531 ****
--- 526,532 ----
case 'c':
case 'd':
case 'e':
+ case 'f':
c = c - 'a' + '9' + 1;
break;
*************** read_radix (fnode * f, char *dest, int l
*** 534,539 ****
--- 535,541 ----
case 'C':
case 'D':
case 'E':
+ case 'F':
c = c - 'A' + '9' + 1;
break;
--
Summary: Letter F not understood as a radix-16 digit in READ
statement.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lei at il dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16704