On 9/7/07, Tim Prince <[EMAIL PROTECTED]> wrote: > Dominique Dhumieres wrote: > > In comment #7 of PR33330, Richard Guenther asked the following question > > I cannot answer: > > > >> Btw, is it mandated by the fortran standard to pass a scalar as array > >> reference? > > > > Does anyone knows the answer? or should it be asked on comp.lang.fortran? > > > Here, it looks as if you mean passing a character string of length 1 as > a variable length string. Certainly, this should be no problem. Pardon > me if I misunderstood. > In either case, there should be plenty of references in c.l.f archives. > In general, passing a scalar where an array reference is required is > non-standard and a serious portability issue. Use of module or > interface syntax should cause any problems to be diagnosed. > For CHARACTER type, there is a distinction between an array (of > character strings, possibly of length 1) and a scalar character string.
What I was after in this particular context is that the miscompilation would have not occured if the frontend passed the character as char* and did the de-reference as plain indirect reference instead of an array reference. Richard.