patch to libgfortran/16704

Victor Leikehman lei@haifasphere.co.il
Wed Jul 28 11:03:00 GMT 2004


Test case:

program main
  character*2 buf
  buf = 'ff'
  read (buf, '(Z2.2)'), i
  if (i.ne.255) call abort
end

===================================================================

2004-07-28  Victor Leikehman  <lei@il.ibm.com>

	PR libgfortran/16704
	* io/read.c (read_radix): Understand letters f and F
	as hex digits.


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	28 Jul 2004 10:58:20 -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;

-- 
  Victor Leikehman
  IBM Research Labs in Haifa, Israel



More information about the Fortran mailing list