public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2021-12-13 12:36 slyfox at gcc dot gnu.org
2021-12-13 12:39 ` [Bug tree-optimization/103682] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: slyfox at gcc dot gnu.org @ 2021-12-13 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
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 <atomic>
bool bug(std::atomic<unsigned> & 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>&, 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<unsigned> & 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=/nix/store/3x3yy5hhikzn8zvhq5fj14a2m9qyxbc8-gcc-12.0.0/bin/g++
COLLECT_LTO_WRAPPER=/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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
@ 2021-12-13 12:39 ` pinskia at gcc dot gnu.org
2021-12-13 12:43 ` [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906 marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-13 12:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Target Milestone|--- |12.0
Target| |x86_64-unknown-linux-gnu
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
2021-12-13 12:39 ` [Bug tree-optimization/103682] " pinskia at gcc dot gnu.org
@ 2021-12-13 12:43 ` marxin at gcc dot gnu.org
2021-12-13 12:44 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-13 12:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Summary|[12 regression] ICE on |[12 regression] ICE on
|atomics: gimple check: |atomics: gimple check:
|expected |expected
|gimple_assign(error_mark), |gimple_assign(error_mark),
|have gimple_nop() in |have gimple_nop() in
|gimple_assign_rhs_code, at |gimple_assign_rhs_code, at
|gimple.h:2852 |gimple.h:2852 since
| |r12-5486-g7df89377a7ae3906
Last reconfirmed| |2021-12-13
Known to work| |11.2.0
CC| |liuhongt at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Known to fail| |12.0
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r12-5486-g7df89377a7ae3906.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
2021-12-13 12:39 ` [Bug tree-optimization/103682] " pinskia at gcc dot gnu.org
2021-12-13 12:43 ` [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906 marxin at gcc dot gnu.org
@ 2021-12-13 12:44 ` pinskia at gcc dot gnu.org
2021-12-14 1:12 ` crazylht at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-13 12:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
C testcase:
int bug(unsigned *ready, unsigned u) {
return __atomic_fetch_and (ready, ~u, 0) & u;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
` (2 preceding siblings ...)
2021-12-13 12:44 ` pinskia at gcc dot gnu.org
@ 2021-12-14 1:12 ` crazylht at gmail dot com
2021-12-14 23:40 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: crazylht at gmail dot com @ 2021-12-14 1:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
Hongtao.liu <crazylht at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crazylht at gmail dot com
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
Mine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
` (3 preceding siblings ...)
2021-12-14 1:12 ` crazylht at gmail dot com
@ 2021-12-14 23:40 ` cvs-commit at gcc dot gnu.org
2021-12-14 23:47 ` crazylht at gmail dot com
2021-12-14 23:52 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-14 23:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:
https://gcc.gnu.org/g:a2a0c91b47537b16908981e206f4e42db8425eca
commit r12-5981-ga2a0c91b47537b16908981e206f4e42db8425eca
Author: liuhongt <hongtao.liu@intel.com>
Date: Tue Dec 14 09:47:08 2021 +0800
Fix ICE. [PR103682]
Check is_gimple_assign before gimple_assign_rhs_code.
gcc/ChangeLog:
PR target/103682
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check
is_gimple_assign before gimple_assign_rhs_code.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/pr103682.c: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
` (4 preceding siblings ...)
2021-12-14 23:40 ` cvs-commit at gcc dot gnu.org
@ 2021-12-14 23:47 ` crazylht at gmail dot com
2021-12-14 23:52 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: crazylht at gmail dot com @ 2021-12-14 23:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC12.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
` (5 preceding siblings ...)
2021-12-14 23:47 ` crazylht at gmail dot com
@ 2021-12-14 23:52 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-14 23:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103682
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-12-14 23:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 12:36 [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 slyfox at gcc dot gnu.org
2021-12-13 12:39 ` [Bug tree-optimization/103682] " pinskia at gcc dot gnu.org
2021-12-13 12:43 ` [Bug tree-optimization/103682] [12 regression] ICE on atomics: gimple check: expected gimple_assign(error_mark), have gimple_nop() in gimple_assign_rhs_code, at gimple.h:2852 since r12-5486-g7df89377a7ae3906 marxin at gcc dot gnu.org
2021-12-13 12:44 ` pinskia at gcc dot gnu.org
2021-12-14 1:12 ` crazylht at gmail dot com
2021-12-14 23:40 ` cvs-commit at gcc dot gnu.org
2021-12-14 23:47 ` crazylht at gmail dot com
2021-12-14 23:52 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).