This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/67921] [6 Regression] "internal compiler error: in build_polynomial_chrec, at tree-chrec.h:147" when using -fsanitize=undefined


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67921

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to bin.cheng from comment #7)
> Hmm, this issue could be simply because chrec_fold_multiply doesn't use
> sizetype as CHREC_RIGHT's type to build pointer type CHREC:
> 
> 	  return build_polynomial_chrec
> 	    (CHREC_VARIABLE (op0),
> 	     chrec_fold_multiply (type, CHREC_LEFT (op0), op1),
> 	     chrec_fold_multiply (type, CHREC_RIGHT (op0), op1));
> 
> It should be fixed by using sizetype for pointer type CHREC node:
> 
> 	  return build_polynomial_chrec
> 	    (CHREC_VARIABLE (op0),
> 	     chrec_fold_multiply (type, CHREC_LEFT (op0), op1),
> 	     chrec_fold_multiply (POINTER_TYPE_P (type) ? sizetype : type,
> 				  CHREC_RIGHT (op0), op1));
> 
> I will test a patch.

Have you managed to test that change?

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