From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 215CF38515FE; Thu, 29 Jul 2021 17:35:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 215CF38515FE From: "matthew.thompson at nasa dot gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/100651] Weird memory corruption with multiple triggers Date: Thu, 29 Jul 2021 17:35:06 +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: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: matthew.thompson at nasa dot gov 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2021 17:35:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100651 --- Comment #5 from Matt Thompson --- Iain, The Linux system would be SUSE Linux Enterprise Server 12 SP3. The macOS sy= stem is macOS 11.5.1. On the Linux machine, I can confirm the error with (I only have some versio= ns of GCC available): * 8.3.0 * 9.2.0 * 10.1.0 * 11.1.0 On the macOS where I just built 11.2.0, I see the same crash. Now, with 7.4.0 and 6.5.0 (can only test on Linux), I don't get the run-time crash. Instead, I believe it works...sort of? To wit: $ ./a.out opt_string.F90 122 T opt_string.F90 123 10922 err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar, err_msg: foo bar,... That last bit goes on for a while. This isn't the intended behavior. Intel 2021.3 does: $ ./a.out opt_string.F90 122 T opt_string.F90 123 7 err_msg: foo bar and NAG 7.0_7048 does: $ ./a.out opt_string.F90 122 T opt_string.F90 123 7 err_msg: foo bar We are unsure why GNU is doing this...recursive-like behavior? It's not like the routine is called in a loop!=