This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix FMT= with CHARACTER arrays (PR fortran/39865, take 3)


On Wed, May 13, 2009 at 04:19:59PM +0200, Dominique Dhumieres wrote:
> > Unless I'm mistaken, Jakub's problems had to do with non-packed arrays
> > and non-packed arrays can only occur with Fortran 90 (or newer).

> Now from a standard f9* and followers point of view, "fmt=b(2,3:4)" has to be 
> handled if b is a character array. Now you can decide to throw an error or 
> a warning if b is not a character array, I don't really care since I'll never 
> use such constructs.  However this should be done in such a way that the 
> behavior won't change too often, should be documented and should be consistent 
> with the legacy policy with respect to g77.

I'd prefer not to go through dozens of further iterations of the patch.
The patch as is more-less keeps the pre-existing gfortran behavior when
fmt= argument has rank 0 (both CHARACTER var or array element, assigned
INTEGER or non-CHARACTER array element (the exceptions are that
it is now refused for assumed-shape and pointer arrays where it can't
reliably work)) and just fixes the CHARACTER array handling.

If possible I'd prefer support for assumed size arrays (by passing ~0 to
format_len?), if really desirable, be done in an incremental change.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]