https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115872
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.5
Status|UNCONFIRMED |NEW
Last reconfirmed| |2024-07-11
CC| |liuhongt at gcc dot gnu.org
Ever confirmed|0 |1
Keywords| |ice-on-valid-code,
| |wrong-debug
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
- _5 = __atomic_fetch_or_8 (&set_work_pending_p, 1, 0);
- # DEBUG old => (long int) _5
+ _6 = .ATOMIC_BIT_TEST_AND_SET (&set_work_pending_p, 0, 1, 0,
__atomic_fetch_or_8);
+ # DEBUG old => NULL
# DEBUG BEGIN_STMT
- # DEBUG D#2 => _5 & 1
+ # DEBUG D#2 => NULL
...
- _10 = ~_5;
- _8 = (_Bool) _10;
- # DEBUG ret => _8
+ _8 = _6 == 0;
+ # DEBUG ret => (_Bool) _10
confirmed. convert_atomic_bit_not does this, it checks for single_use
and removes the def, failing to release the name (which would fix this up
IIRC).
Note the function removes stmts in "wrong" order (before uses of LHS
are removed), so it requires larger surgery. And it leaks SSA names.