From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A6FEA385B529; Mon, 20 Mar 2023 19:46:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6FEA385B529 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679341618; bh=BDQCdlKiWPs8qp7JacsNI8gBqtbm0OtvufNsIkdQ9hI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p9YFl2e47PlHBG950kzyhZ+nIl0tcVUeetlPsVSLMjl23YHc2NsobtrqVM38RT1Mh xHRYck3Knq77+wgrzpfzY0C9hVWRmTUFJG2pX+/57vVHPnwy5cbpkqMPo5X7MpgKhI 8wUcKje6IEqlr9sAPZ+bXyYvv52UJYRMzAVHVrNw= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109216] Wrong behaviour explained in -fno-underscoring documentation Date: Mon, 20 Mar 2023 19:46:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on keywords everconfirmed bug_status cc Message-ID: In-Reply-To: References: 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=3D109216 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-03-20 Keywords| |documentation Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC| |anlauf at gcc dot gnu.org --- Comment #1 from anlauf at gcc dot gnu.org --- Confirmed. Patch: diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 5679e2f2650..cbe7f377507 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1573,7 +1573,7 @@ Do not transform names of entities specified in the Fortran source file by appending underscores to them. With @option{-funderscoring} in effect, GNU Fortran appends one -underscore to external names with no underscores. This is done to ensure +underscore to external names. This is done to ensure compatibility with code produced by many UNIX Fortran compilers. @emph{Caution}: The default behavior of GNU Fortran is @@ -1596,7 +1596,7 @@ I =3D J() + MAX_COUNT (MY_VAR, LVAR) @noindent is implemented as something akin to: @smallexample -i =3D j_() + max_count__(&my_var__, &lvar); +i =3D j_() + max_count_(&my_var, &lvar); @end smallexample With @option{-fno-underscoring}, the same statement is implemented as:=