Skip to content
Snippets Groups Projects
Commit 4f4722b0 authored by Andrew Pinski's avatar Andrew Pinski Committed by Tamar Christina
Browse files

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: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent 0014a858
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment