From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BBD4385840D; Mon, 13 Dec 2021 12:36:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BBD4385840D From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103682] New: [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 Date: Mon, 13 Dec 2021 12:36:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org 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 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 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: Mon, 13 Dec 2021 12:36:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103682 Bug ID: 103682 Summary: [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- ICE extracted from a real project: $ cat bug.cpp #include bool bug(std::atomic & ready, unsigned u) { return (ready.fetch_and(~u) & u); } $ g++-12.0.0 -Ofast -c bug.cpp during GIMPLE pass: fab bug.cpp: In function 'bool bug(std::atomic&, unsigned int)': bug.cpp:6:6: internal compiler error: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 6 | bool bug(std::atomic & ready, unsigned u) { | ^~~ 0x20a58f7 internal_error(char const*, ...) ???:0 0x7c76dd gimple_check_failed(gimple const*, char const*, int, char const*, gimple_code, tree_code) ???:0 $ g++-12.0.0 -v Using built-in specs. COLLECT_GCC=3D/nix/store/3x3yy5hhikzn8zvhq5fj14a2m9qyxbc8-gcc-12.0.0/bin/g++ COLLECT_LTO_WRAPPER=3D/nix/store/3x3yy5hhikzn8zvhq5fj14a2m9qyxbc8-gcc-12.0.= 0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20211212 (experimental) (GCC)=