This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Fortran,patch]
- From: Tobias Burnus <burnus at net-b dot de>
- To: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, François-Xavier Coudert <fxcoudert at gmail dot com>
- Date: Thu, 15 Mar 2007 22:39:01 +0100
- Subject: [Fortran,patch]
:ADDPATCH fortran:
The following is a puzzle for me. I know that dumping cores and
backtracing worked at some point. (Don't ask me whether this was with
the committed or with the submitted version.)
Nonetheless, both the current version (by FX) and the version submitted
before don't contain this fix. In any case, _gfortran_set_std only
contains 3 arguments and - obviously - dumping core or backtracing does
not work.
I think this counts as real Schrödinbug. ("A Schroedinbug is a bug that
manifests itself apparently only after the software is used in an
unusual way or seemingly at the point in time that a programmer reading
the source code notices that the program should never have worked in the
first place, at which point the program stops working entirely until the
mysteriously now non-functioning code is repaired." [wikipedia].)
Build and regression-tested on x86_64-unknown-linux-gnu.
Ok for the trunk?
Tobias
2007-03-15 Tobias Burnus <burnus@net-b.de>
* trans-decl.c (gfc_generate_function_code): Use all arguments of
set_std.
Index: gcc/fortran/trans-decl.c
===================================================================
*** gcc/fortran/trans-decl.c (revision 122956)
--- gcc/fortran/trans-decl.c (working copy)
*************** gfc_generate_function_code (gfc_namespac
*** 3137,3143 ****
if (sym->attr.is_main_program)
{
tree gfc_int4_type_node = gfc_get_int_type (4);
! tmp = build_call_expr (gfor_fndecl_set_std, 3,
build_int_cst (gfc_int4_type_node,
gfc_option.warn_std),
build_int_cst (gfc_int4_type_node,
--- 3137,3143 ----
if (sym->attr.is_main_program)
{
tree gfc_int4_type_node = gfc_get_int_type (4);
! tmp = build_call_expr (gfor_fndecl_set_std, 5,
build_int_cst (gfc_int4_type_node,
gfc_option.warn_std),
build_int_cst (gfc_int4_type_node,