This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PTR-PLUS] Fix PR 32144 and PR 32145 for the branch


Hi,
  The problem with these two bugs is just some small oversight with 
changing the VRP pass and CHREC for pointer plus.  The VRP pass was trying 
to create a PLUS_EXPR for pointer types which is now invalid.  While the 
assert in chrec_fold_plus_poly_poly for the type of the two chrec was 
incorrect as the second chrec, when the first chrec is a pointer, is 
sizetype now.  This patch changes the assert to take that into account. 
These testcases came both from the Linux kernel.

Committed to the branch after a bootstrap/test on powerpc64-linux-gnu and 
a build for spu-elf with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

        * tree-vrp.c (extract_range_from_assert): Create
        POINTER_PLUS_EXPR for pointer types.
        * tree-chrec.c (chrec_fold_plus_poly_poly): If the
        first chrec is a pointer type, then the second should
        be sizetype and not the first's type.

        * gcc.c-torture/compile/20070529-1.c: New test.
        * gcc.c-torture/compile/20070529-2.c: New test.


Attachment: fixcouple.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]