This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: FreeBSD Fortran Failure
Mark Mitchell wrote:
>
> >>>>> "Toon" == Toon Moene <toon@moene.indiv.nluug.nl> writes:
>
> Toon> This is indeed what the code in gcc/libf2c/libI77/endfile.c
> Toon> expects.
>
> How do you propose we debug the problem?
>
> I am willing to try to step around in the code to figure out what's
> going on, but I will need some help. If you can point me places to
> look, that would be useful.
Well, the way *I* would do it if I had access to a FreeBSD system is to
see what return code and errno value resulted from the last few lines of
gcc/libf2c/libI77/endfile.c:
#else /* !defined(HAVE_FTRUNCATE) */
fflush(b->ufd);
rc = ftruncate(fileno(b->ufd),loc);
#endif /* !defined(HAVE_FTRUNCATE) */
if (rc)
err(a->aerr,111,"endfile");
return 0;
}
because it's the rc != 0 condition that triggers the abort.
> This is a regression, so we will have to revert the patch that caused
> it if we cannot track down the failure.
:-) That's surely the way to get my attention ! It would be a very sad
day if we have to revert a change that everyone involved thinks is
absolutely the right way to go because some target OS can't get its
ftruncate correct^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H.
NO CARRIER
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)