[PATCH] fortran/28213 -- Fix Hollerith in IO list

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Jul 3 19:37:00 GMT 2006


The following patch fixes an ICE when a Hollerith constant
appears in an IO list.  For some reason, the attached test
is not caught by DejaGNU.  I ping Janis for advice on the
test.  I would like to commit the patch even without a test,
and then commit the test once Janis and I have exchanged 
some thoughts.

2006-07-03  Steven G. Kargl  <kargls@comcast.net>

	* trans-io.c (transfer_expr): Hollerith is not permitted in 
	an IO list.

2006-07-03  Steven G. Kargl  <kargls@comcast.net>

	* gfortran.dg/hollerith5.f90: New test, which is somehow broken.

-- 
Steve
-------------- next part --------------
Index: trans-io.c
===================================================================
--- trans-io.c	(revision 115140)
+++ trans-io.c	(working copy)
@@ -1738,6 +1738,10 @@
 	}
       return;
 
+    case BT_HOLLERITH:
+      gfc_error ("Hollerith constant not allowed in IO list");
+      return;
+
     default:
       internal_error ("Bad IO basetype (%d)", ts->type);
     }
-------------- next part --------------
! { dg-do compile }
! { dg-options "-w" }
program a
  write(*,*) 3horz  ! { dg-error "Hollerith" "" {target *-*-* } 3 }
end program a


More information about the Fortran mailing list