This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Tobias Burnus <burnus at net-b dot de>, fortran at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Sat, 22 Jun 2013 22:11:32 +0200
- Subject: Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP
- References: <51B8721A dot 6000000 at net-b dot de> <2737126 dot 5b1v7aemIl at polaris> <alpine dot LNX dot 2 dot 00 dot 1306222057160 dot 2896 at trevally dot site>
> Except that now FreeBSD 10.x is broken. :-(
Death to the guy whose thought that adding/removing _t was a good idea...
> In file included from
> /scratch2/tmp/gerald/gcc-HEAD/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'
> fp_except set_excepts;
> ^
> gmake[3]: *** [fpu.lo] Error 1
>
> Excerpt from the man page on such a system:
>
> fp_except_t
> fpgetmask(void);
>
> fp_except_t
> fpsetmask(fp_except_t mask);
>
> fp_except_t
> fpgetsticky(void);
>
> fp_except_t
> fpresetsticky(fp_except_t sticky);
>
> My autoconf foo does not seem to be strong enough for libgfortran,
> but I assume checking for both types and then using #ifdef HAVE_FP_EXCEPT_T
> ...#elif HAVE_FP_EXCEPT...#endif ought to work?
Yes, I think that we just need to patch the LIBGFOR_CHECK_FPSETMASK check in
acinclude.m4 so as to also test the return type of the function.
--
Eric Botcazou