On Wed, 2005-07-27 at 13:08 +0200, Richard Guenther wrote:
> Hi all!
>
> I reduced my array aliasing libstdc++ failures to the following
> testcase:
>
> struct iterator
> {
> int* ptr;
> iterator(int* _ptr) : ptr(_ptr) {}
> };
>
> struct container {
> int* first;
> container(int* _first) : first(_first) {}
> iterator begin() { return iterator(first); }
> };
>
> bool includes(const iterator&);
>
> bool test4()
> {
> int array[] = {2, 4};
> container con(array);
> return includes(con.begin());
> }
>
> the weird thing now is, that the alias1 dump contains
>
> # SFT.2_19 = V_MAY_DEF <SFT.2_2>;
> # SFT.4_20 = V_MAY_DEF <SFT.4_15>;
> D.1797_16 = includes (&D.1794);
We get this right, you are doing something wrong in the conversion:
PTA calculates the set to be (in alias2):
_ptr_8 = { array }
and in alias1:
_ptr_9 = { array }
Which is right.
It looks like you aren't converting your new subvars right, or
something.
--Dan