https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104880
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:eb5edcf3f3ae008a1c55c88f08a886a5f350a759 commit r12-7613-geb5edcf3f3ae008a1c55c88f08a886a5f350a759 Author: Richard Biener <rguent...@suse.de> Date: Fri Mar 11 14:09:33 2022 +0100 tree-optimization/104880 - update-address-taken and cmpxchg The following addresses optimistic non-addressable marking of an argument of __atomic_compare_exchange_n which broke when I added DECL_NOT_GIMPLE_REG_P since we cannot guarantee we can rewrite it when TREE_ADDRESSABLE is unset. Instead we have to restore TREE_ADDRESSABLE in that case. 2022-03-11 Richard Biener <rguent...@suse.de> PR tree-optimization/104880 * tree-ssa.cc (execute_update_address_taken): Remember if we optimistically made something not addressable and prepare to undo it. * g++.dg/opt/pr104880.cc: New testcase.