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;
Confirmed.
Subject: Bug 16704 CVSROOT: /cvs/gcc Module name: gcc Changes by: steven@gcc.gnu.org 2004-08-05 08:37:43 Modified files: libgfortran : ChangeLog libgfortran/io : read.c Log message: Commit for Victor Leikehman <lei@il.ibm.com> PR libgfortran/16704 * io/read.c (read_radix): Understand letters f and F as hex digits. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.54&r2=1.55 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/read.c.diff?cvsroot=gcc&r1=1.2&r2=1.3
Fixed.