From 944b8b35a92ccdde4c4fa5458a1b48d8e8a25412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Coudert?= Date: Wed, 12 Oct 2005 20:21:31 +0000 Subject: gfortran.h: Add bitmasks for different FPE traps. * gfortran.h: Add bitmasks for different FPE traps. Add fpe member to options_t. * invoke.texi: Document the new -ffpe-trap option. * lang.opt: Add -ffpe-trap option. * options.c (gfc_init_options): Initialize the FPE option. (gfc_handle_fpe_trap_option): New function to parse the argument of the -ffpe-trap option. (gfc_handle_option): Add case for -ffpe-trap. * trans-decl.c: Declare a tree for the set_fpe library function. (gfc_build_builtin_function_decls): Build this tree. (gfc_generate_function_code): Generate a call to set_fpe at the beginning of the main program. * trans.h: New tree for the set_fpe library function. * Makefile.am: Add fpu.c to the build process, and target-dependent code as fpu-target.h. * Makefile.in: Regenerate. * configure.ac: Add call to configure.host to set FPU_HOST_HEADER. * configure: Regenerate. * config.h.in: Regenerate. * aclocal.m4: Regenerate. * configure.host: New script to determine which host-dependent code should go in. * libgfortran.h: Add fpe option, remove previous fpu_ options. Add bitmasks for different FPE traps. Add prototype for set_fpu. * runtime/environ.c: Remove environment variables to control fpu behaviour. * runtime/fpu.c (set_fpe): New function for the front-end. * runtime/main.c (init): Set FPU state. * config: New directory to store host-dependent code. * config/fpu-387.h: New file with code handling the i387 FPU. * config/fpu-glibc.h: New file with code for glibc systems. * config/fpu-generic.h: Fallback for the most generic host. Issue warnings. From-SVN: r105328 --- gcc/fortran/invoke.texi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/invoke.texi') diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 847ab29..88e8eef 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -133,7 +133,7 @@ by type. Explanations are in the following sections. @item Debugging Options @xref{Debugging Options,,Options for Debugging Your Program or GCC}. @gccoptlist{ --fdump-parse-tree} +-fdump-parse-tree -ffpe-trap=@var{list}} @item Directory Options @xref{Directory Options,,Options for Directory Search}. @@ -464,6 +464,22 @@ Output the internal parse tree before starting code generation. Only really useful for debugging gfortran itself. @end table +@table @gcctabopt +@cindex -ffpe-trap=@var{list} option +@cindex option, -ffpe-trap=@var{list} +@item -ffpe-trap=@var{list} +Specify a list of IEEE exceptions when a Floating Point Exception +(FPE) should be raised. On most systems, this will result in a SIGFPE +signal being sent and the program being interrupted, producing a core +file useful for debugging. @var{list} is a (possibly empty) comma-separated +list of the following IEEE exceptions: @samp{invalid} (invalid floating +point operation, such as @code{sqrt(-1.0)}), @samp{zero} (division by +zero), @samp{overflow} (overflow in a floating point operation), +@samp{underflow} (underflow in a floating point operation), +@samp{precision} (loss of precision during operation) and @samp{denormal} +(operation produced a denormal denormal value). +@end table + @xref{Debugging Options,,Options for Debugging Your Program or GCC, gcc,Using the GNU Compiler Collection (GCC)}, for more information on debugging options. -- cgit v1.1