diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2007-01-18 13:54:11 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-01-18 13:54:11 +0100 |
commit | eedeea04da0bbdf7e975a31c9c55f3929657b909 (patch) | |
tree | 35528f51b61de752d5ace70f20f9840ecaf371df /gcc/fortran/trans-decl.c | |
parent | 9521dd6bd14f4915eecc79f886b805d3e1eb1ff7 (diff) | |
download | gcc-eedeea04da0bbdf7e975a31c9c55f3929657b909.zip gcc-eedeea04da0bbdf7e975a31c9c55f3929657b909.tar.gz gcc-eedeea04da0bbdf7e975a31c9c55f3929657b909.tar.bz2 |
re PR libfortran/29649 (Force core dump on runtime library errors)
2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Tobias Burnus <burnus@net-b.de>
PR libfortran/29649
* gfortran.h (gfc_option_t): Add flag_dump_core.
* lang.opt: Add -fdump-core option.
* invoke.texi: Document the new options.
* trans-decl.c (gfc_build_builtin_function_decls): Add new
options to the call to set_std.
* options.c (gfc_init_options, gfc_handle_option): Set the
new options.
2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Tobias Burnus <burnus@net-b.de>
PR libfortran/29649
* runtime/environ.c (variable_table): New GFORTRAN_ERROR_DUMPCORE
environment variable.
* runtime/compile_options.c (set_std): Add new argument.
* runtime/error.c (sys_exit): Move from io/unix.c. Add coredump functionality.
* libgfortran.h (options_t): New dump_core and backtrace members.
(sys_exit): Move prototype.
* io/unix.c (sys_exit): Move to runtime/error.c.
* configure.ac: Add check for getrlimit.
* configure: Regenerate.
Co-Authored-By: Tobias Burnus <burnus@net-b.de>
From-SVN: r120897
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 44ccbcc..000772c 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2375,7 +2375,8 @@ gfc_build_builtin_function_decls (void) gfor_fndecl_set_std = gfc_build_library_function_decl (get_identifier (PREFIX("set_std")), void_type_node, - 3, + 4, + gfc_int4_type_node, gfc_int4_type_node, gfc_int4_type_node, gfc_int4_type_node); @@ -3143,6 +3144,10 @@ gfc_generate_function_code (gfc_namespace * ns) arglist = gfc_chainon_list (arglist, build_int_cst (gfc_int4_type_node, pedantic)); + arglist = gfc_chainon_list (arglist, + build_int_cst (gfc_int4_type_node, + gfc_option.flag_dump_core)); + tmp = build_function_call_expr (gfor_fndecl_set_std, arglist); gfc_add_expr_to_block (&body, tmp); } |