From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22906 invoked by alias); 15 Mar 2007 21:39:13 -0000 Received: (qmail 22882 invoked by uid 22791); 15 Mar 2007 21:39:12 -0000 X-Spam-Check-By: sourceware.org Received: from zs04.physik.fu-berlin.de (HELO zs04.physik.fu-berlin.de) (160.45.35.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Mar 2007 21:39:05 +0000 Received: from ith.physik.fu-berlin.de ([160.45.32.115] helo=[127.0.0.1]) by zs04.physik.fu-berlin.de with esmtp (Exim 4.63) (envelope-from ) id 1HRxf4-0004Ql-FB; Thu, 15 Mar 2007 22:39:03 +0100 Message-ID: <45F9BCF5.2060703@net-b.de> Date: Thu, 15 Mar 2007 21:51:00 -0000 From: Tobias Burnus User-Agent: Thunderbird 1.5.0.9 (X11/20060911) MIME-Version: 1.0 To: "'fortran@gcc.gnu.org'" , gcc-patches , =?ISO-8859-15?Q?Fran=E7ois-Xavier_Coudert?= Subject: [Fortran,patch] Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable X-Scanned: No viruses found. Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg01055.txt.bz2 :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=F6dinbug. ("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 * trans-decl.c (gfc_generate_function_code): Use all arguments of set_std. Index: gcc/fortran/trans-decl.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D *** 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 =3D gfc_get_int_type (4); ! tmp =3D 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 =3D gfc_get_int_type (4); ! tmp =3D 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,