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, fortran] PR15809 (PR19276) - ICE and segfault with au tomatic character, dummy pointer arrays


THOMAS Paul Richard 169137 wrote:

void c_(char *a, int i)
{
         printf("i = %d\n");
^ i
         printf(">%*.*s<\n",i,i,a);
}

THOMASP@PC-THOMAS-P /cygdrive/d/gfortran
$ /irun/bin/gfortran toons.f90 toons.c ; ./a
i = 0

r1234567<

i = 0 is wrong (and after some hard looking, I see why), but the rest of the answer is correct :-)


--
Toon Moene, KNMI, The Netherlands
Phone: +31 30 2206443; e-mail: moene@knmi.nl


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