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 32167 (ICE in VRP due to CHREC) and a VRP bug blocking building for sparc-solaris


Hi,

  Two problems with the branch; one due to chrec_fold_plus returning the 
wrong type and the other due to forgetting that we could get 
MIN_EXPR/MAX_EXPR for pointer types.  The reason why chrec_fold_plus was 
returning the wrong type is because we assumed the types match which is 
not true for pointers type, the second operand will be sizetype so we need 
to convert that to the type.

Oh for the VRP patch, we now handle MIN_EXPR and MAX_EXPR better in that 
we get the non-null/null ranges for those expressions instead of just 
setting the result to varying.

Committed to the branch after a build/test on spu-elf.

Thanks,
Andrew Pinski

ChangeLog:

        * tree-vrp.c (extract_range_from_binary_expr): Handle
        MIN_EXPR/MAX_EXPR for pointers type.
        * tree-chrec.c (chrec_fold_plus): When either
        operand is zero, convert the other operand.
 

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


Attachment: fixacouplemore.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]