This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/21593] FAIL: gfortran.dg/dev_null.f90
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2005 08:44:52 -0000
- Subject: [Bug libfortran/21593] FAIL: gfortran.dg/dev_null.f90
- References: <20050515210432.21593.danglin@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-06-18 08:44 -------
The problem is in the different behavior of ftruncate on /dev/null:
$ cat a.c
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
int main (void)
{
int fd = open ("/dev/null", O_RDWR);
ftruncate (fd, 0);
printf ("%d\n", errno);
close (fd);
return 0;
}
On linux, this code outputs 22 (EINVAL), while on freebsd it outputs 0. I
suppose the reason of the failure is similar for other platforms.
I'm sure what to do, but I don't think I'll take too much time thinking about
it, since this a low-priority bug really.
While we wait for this to be solved, I think we should make sure the testcase
only runs on linux and solaris (for which this is known to work).
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Last reconfirmed|2005-05-17 08:04:28 |2005-06-18 08:44:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21593