This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: segfault within CPU_TIME (was: libgfortran/intrinsics/cpu_time.c: No such file or directory.)
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: Florian <flad at gmx dot at>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 22 Aug 2007 10:19:57 +0100
- Subject: Re: segfault within CPU_TIME (was: libgfortran/intrinsics/cpu_time.c: No such file or directory.)
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oCydFdVB9byIGc5s08/wS/lbz6LWrNNW4Vwafy8b5iaO10Sw6EtdPRrgSE9lymjBitd4YWXFg0Fh+/+AvEAQmyFWXa0zkokFqb20xMGTjb+PuzIAZZPfKjv7E9dNW7hLD9L/dSvm+awixIK63tANbbpQZ9zpe9r5HDoiA6enbaM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ToFlnVEuM5NVCmxuYHVInTmbPu8CncWvHjoWzjkCLzru1uP+ZTSpdAowAZI/HwiTK6JzB/mp1zCg6Ghr2tjT8j8qR1fQd8AKk6j+V6CH2bRR86B7H1/upnSznmuUNO/0ER6zCw619RwOWKwBCr2Fmi1xDsexTKCO/FdAqybloo0=
- References: <19c433eb0708211022q40be9824idd263443180b5d47@mail.gmail.com> <46CB53BC.6020006@gmx.at>
> Is this a problem of the cpu_time intrinsic or does the error actually
> already occur before?
This is known as PR30780
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30780): the library
cpu_time function itself features a conversion with loss of precision
on standard targets. As Anrew said in the PR, it's hard to fix because
"there are no functions which convert from a floating point to an
integer that might not raise a signal. This is why setting trapping
on
precision is almost something you never want to do."
Moreover, Jerry indicated in the PR that some of the I/O code might be
affected similarly.
So, to play it safe, I think it's best not to use -ffpe-trap=invalid
for now (-ffpe-trap=zero and others should be fine).
FX