From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D4933858D1E; Sat, 11 Mar 2023 19:56:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D4933858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678564587; bh=7x1BhQJaagG+hmBslOAapA/SdtSqraR8H7Jrm8gXjH0=; h=From:To:Subject:Date:From; b=hupRvJT1+QEvD3ZtGzxoJVGKXGs36hwG9svyv54GkDgzZhcd3ZosHUzYHLybthXFM Nl1PN/rIYX8ZErGxn9IgzHmllPN/c8KDMNynV1Xt4zPl+7X+4aMIvYiksqAH6DDEaw Yv7JWQ1TzdSPt2+BCZ3SRMnLw0nFOXC3pimZVtdQ= From: "roland.illig at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109105] New: Error-prone format string building in resolve.cc Date: Sat, 11 Mar 2023 19:56:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: translation X-Bugzilla-Severity: normal X-Bugzilla-Who: roland.illig at gmx dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109105 Bug ID: 109105 Summary: Error-prone format string building in resolve.cc Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: translation Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: roland.illig at gmx dot de Target Milestone: --- The function resolve_operator constructs a format string and then passes it= to gfc_error. This approach is wrong, and if a translator such as me makes a t= ypo in the translation, GCC can crash. Instead of jumping to bad_op, each error must be handled individually, and = the messages to be translated must be marked as having format gcc-internal-form= at or gfc-internal-format, not c-format.=