https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105769
--- Comment #24 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <tnfch...@gcc.gnu.org>: https://gcc.gnu.org/g:4f4722b0722ec343df70e5ec5fd9d5c682ff8149 commit r15-6656-g4f4722b0722ec343df70e5ec5fd9d5c682ff8149 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Fri Nov 15 20:22:04 2024 -0800 cfgexpand: Handle integral vector types and constructors for scope conflicts [PR105769] This is an expansion of the last patch to also track pointers via vector types and the constructor that are used with vector types. In this case we had: ``` _15 = (long unsigned int) &bias; _10 = (long unsigned int) &cov_jn; _12 = {_10, _15}; ... MEM[(struct vec *)&cov_jn] ={v} {CLOBBER(bob)}; bias ={v} {CLOBBER(bob)}; MEM[(struct function *)&D.6156] ={v} {CLOBBER(bob)}; ... MEM <vector(2) long unsigned int> [(void *)&D.6172 + 32B] = _12; MEM[(struct function *)&D.6157] ={v} {CLOBBER(bob)}; ``` Anyways tracking the pointers via vector types to say they are alive at the point where the store of the vector happens fixes the bug by saying it is alive at the same time as another variable is alive. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/105769 gcc/ChangeLog: * cfgexpand.cc (vars_ssa_cache::operator()): For constructors walk over the elements. gcc/testsuite/ChangeLog: * g++.dg/torture/pr105769-1.C: New test. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>