Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-24 Thread Gerald Pfeifer
On Mon, 24 Jun 2013, Tobias Burnus wrote: I have now committed (Rev. 200360) the attached patch. (Compared to the draft patch, with a missing "," added in AC_CHECK_TYPES). Eric, Gerald: Can you confirm that it now works on both FreeBSD and Solaris? I can confirm FreeBSD 8.x and 10.x. Thanks,

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-24 Thread Eric Botcazou
> Eric, Gerald: Can you confirm that it now works on both FreeBSD and Solaris? It works fine on Solaris, thanks! > Eric: Should one (conditionally) include on Solaris? I > am asking because LIBGFOR_CHECK_FPSETMASK in acinclude.m4 uses that > include file during configure - but libgfortran.h (or

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-24 Thread Tobias Burnus
Eric, Gerald, all, I have now committed (Rev. 200360) the attached patch. (Compared to the draft patch, with a missing "," added in AC_CHECK_TYPES). Eric, Gerald: Can you confirm that it now works on both FreeBSD and Solaris? Eric: Should one (conditionally) include on Solaris? I am asking

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-23 Thread Gerald Pfeifer
On Sun, 23 Jun 2013, Tobias Burnus wrote: > Gerald and Eric: Would the following work for you? (Sorry, no > config.h.in/configure patch; I haven't build in maintainer's mode, yet.) Yes, that looks like what I had in mind. Thanks, Tobias! Gerald

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-22 Thread Tobias Burnus
Eric Botcazou wrote: 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 acinclu

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-22 Thread Eric Botcazou
> 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: u

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-22 Thread Gerald Pfeifer
On Fri, 21 Jun 2013, Eric Botcazou wrote: > 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': > .

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-21 Thread Eric Botcazou
> 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

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-16 Thread Mikael Morin
Hello, Le 16/06/2013 19:33, Tobias Burnus a écrit : > * PING * > > Minor change: Jakub suggested to print no exception status with older > gfortran programs. Hence, the library now defaults to 0. (Older programs > do not pass this argument to the library.) - I also updated > gfortran.texi for tha

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-16 Thread Tobias Burnus
* PING * Minor change: Jakub suggested to print no exception status with older gfortran programs. Hence, the library now defaults to 0. (Older programs do not pass this argument to the library.) - I also updated gfortran.texi for that change. Tobias On June 12, 2013 17:50, Tobias Burnus wr

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-12 Thread Jakub Jelinek
On Wed, Jun 12, 2013 at 03:05:30PM +0200, Tobias Burnus wrote: > --- a/libgfortran/runtime/stop.c > +++ b/libgfortran/runtime/stop.c > @@ -32,6 +32,37 @@ see the files COPYING3 and COPYING.RUNTIME respectively. > If not, see > #endif > > > +/* Fortran 2008 demands: If any exception (14) is s

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-12 Thread Tobias Burnus
Updated version: * Uros suggestions are incorporated * Changed from -f(no-)underflow-warning to -ffpe-summary=[none,all,underflow,...] Tobias Burnus wrote: David: Can you have a look at libgfortran/config/fpu-aix.h - Thanks! The attached patch causes gfortran-compiled programs to print warnin

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-12 Thread David Edelsohn
On Wed, Jun 12, 2013 at 9:05 AM, Tobias Burnus wrote: > 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 AIX bits look correct. Thanks very much for investigating AIX support. Thanks, David

Re: [Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-12 Thread Uros Bizjak
On Wed, Jun 12, 2013 at 3:05 PM, Tobias Burnus wrote: > 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! > + unsigned short cw; + + __asm__ ("fnstsw %0" : "=a" (cw)); __asm__ __volatile__ ("fnstsw\t%0" :

[Patch, Fortran] Print floating-point exception status after STOP/ERROR STOP

2013-06-12 Thread Tobias Burnus
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 attached patch causes gfortran-compiled programs to print warnings like Note: The following floating-point status flag is signalling: IEEE_DIVIDE_BY_ZERO