This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches at gcc dot gnu dot org, gfortran <fortran at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Fri, 21 Jun 2013 15:14:20 +0200
- Subject: Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP
- References: <51B8721A dot 6000000 at net-b dot de>
> David: Can you have a look at libgfortran/config/fpu-aix.h - Thanks!
> Uros: Can you have a look at libgfortran/config/fpu-387.h - Thanks!
The patch silently changes libgfortran/config/fpu-sysv.h as well, breaking
Solaris in the process:
In file included from /nile.build/botcazou/gcc-
head/src/libgfortran/runtime/fpu.c:29:0:
./fpu-target.h: In function 'get_fpu_except_flags':
./fpu-target.h:88:3: error: unknown type name 'fp_except_t'
fp_except_t set_excepts;
^
make[2]: *** [fpu.lo] Error 1
make[2]: Leaving directory `/nfs/nile/nile.build/botcazou/gcc-head/sparc-sun-
solaris2.10/sparc-sun-solaris2.10/libgfortran'
Excert from the man page:
NAME
fpgetround, fpsetround, fpgetmask, fpsetmask, fpgetsticky,
fpsetsticky - IEEE floating-point environment control
SYNOPSIS
#include <ieeefp.h>
fp_rnd fpgetround(void);
fp_rnd fpsetround(fp_rnd rnd_dir);
fp_except fpgetmask(void);
fp_except fpsetmask(fp_except mask);
fp_except fpgetsticky(void);
fp_except fpsetsticky(fp_except sticky);
Fixed thusly, applied as obvious.
2013-06-21 Eric Botcazou <ebotcazou@adacore.com>
* config/fpu-sysv.h (get_fpu_except_flags): Fix typo.
--
Eric BotcazouIndex: config/fpu-sysv.h
===================================================================
--- config/fpu-sysv.h (revision 200189)
+++ config/fpu-sysv.h (working copy)
@@ -85,7 +85,7 @@ int
get_fpu_except_flags (void)
{
int result;
- fp_except_t set_excepts;
+ fp_except set_excepts;
result = 0;
set_excepts = fpgetsticky ();