------- Comment #6 from dberlin at gcc dot gnu dot org  2009-02-04 21:16 -------
Subject: Re:  [4.4 Regression] -fstrict-aliasing 
        miscompilation

On Wed, Feb 4, 2009 at 3:59 PM, rguenth at gcc dot gnu dot org
<gcc-bugzi...@gcc.gnu.org> wrote:
>
>
> ------- Comment #5 from rguenth at gcc dot gnu dot org  2009-02-04 20:59 
> -------
> On the alias-improvements branch the testcase also fails with
> -O -fdelete-null-pointer-checks, so this is definitely a PTA bug.
> PTA thinks the points-to set for na_5 is
>
> na_5, is dereferenced, points-to NULL, points-to vars: { nl }
>
> which would definitely enable deleting the store, as nl is a local variable.
>
> The constraints that should make na_5 point to NONLOCAL as well are
>
> h = &NONLOCAL
> x = &NONLOCAL
> x_1 = x
> *na_5 = x_1
> D.1262_20 = *na_5
> na_21 = D.1262_20 + 32
> na_4 = na_21
> na_5 = na_4
>
> relevant unifications are
>
> Unifying x to h
> Unifying na_4 to na_5
>
Given those constraints, there is no way it will or should point to NONLOCAL.
na_5 doesn't actually point to anything given these constraints (IE
there is no na_5 = <something>), unless D.1262_20 + 32 points to
something, which it doesn't give the above constraints.

Basically
*a = b
c = *a

Does not imply that c = b if a is empty, which is what is happening
here, AFAICT.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39100

Reply via email to