From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2EC8F3858D28; Mon, 8 May 2023 20:35:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EC8F3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683578122; bh=R+oqbkYT5sx4JwhnbNL/KaZPV+6RxWpL4iizZ/ceJtk=; h=From:To:Subject:Date:From; b=jhxLA+1eshU0eALeuXM1sd5bUgFWIobjOaBXk9WGAP+IP630g+vOC+SSo4IPY1tlp D2sqaXRh0teLEuO1doWrmKL7l3SzGNPj6RfssBuaaUgtXHC7OtPIA62XxzSUq0+nnS 8/lLXpV+g2zh796sgmXP0yDPdemeH9StM/KEGRAs= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109780] New: csmith: runtime crash with -O2 -march=znver1 Date: Mon, 08 May 2023 20:35:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com 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 bug_severity priority component assigned_to reporter target_milestone attachments.created 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=3D109780 Bug ID: 109780 Summary: csmith: runtime crash with -O2 -march=3Dznver1 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Created attachment 55023 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55023&action=3Dedit C source code The attached C code seems to work fine with -O2: $ ../results.20230507.asan.ubsan/bin/gcc -w -O2 bug916.c $ ./a.out checksum =3D 44DCF65B $=20 But adding -march=3Dznver1 seems to cause trouble: $ ../results.20230507.asan.ubsan/bin/gcc -w -O2 -march=3Dznver1 bug916.c $ ./a.out Segmentation fault (core dumped) $=20 Adding the -fno-strict-aliasing flag doesn't seem to help: $ ../results.20230507.asan.ubsan/bin/gcc -w -O2 -march=3Dznver1 -fno-strict-aliasing bug916.c $ ./a.out Segmentation fault (core dumped) $=20 The bug seems to have existed for a while: $ ../results.20230417/bin/gcc -w -O2 -march=3Dznver1 -fno-strict-aliasing=20 bug916.c $ ./a.out Segmentation fault (core dumped) $=