[PATCH] Fix handle_ptr_arith
Richard Guenther
rguenther@suse.de
Thu Jun 12 12:04:00 GMT 2008
On Tue, 3 Jun 2008, Daniel Berlin wrote:
> Looks good to me
>
> On Tue, Jun 3, 2008 at 10:44 AM, Richard Guenther <rguenther@suse.de> wrote:
> >
> > This fixes handle_ptr_arith to fall back to constraints from integer
> > if a non-positive offset is added to a pointer.
> >
> > For the testcase
> >
> > int foo(int i)
> > {
> > int *p = &i + 1;
> > int *q = p - 1;
> > return *q;
> > }
> >
> > we now correctly say p points to { } and q points to { ANYTHING }, while
> > previously q pointed to { }.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu, ok?
Applied to the 4.3 branch as well after bootstrapping and testing
on x86_64-unknown-linux-gnu.
Richard.
More information about the Gcc-patches
mailing list