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/23511] [4.1 Regression] Segfault in fold_binary


------- Additional Comments From sebastian dot pop at cri dot ensmp dot fr  2005-08-22 12:34 -------
The following patch fixes the problem.  However I cannot boot'n'regtest
it for the moment.  I will commit it only tomorow once it is validated.

seb

*** tree-ssa-loop-niter.c.~2.39.~	2005-08-21 12:48:06.000000000 +0200
--- tree-ssa-loop-niter.c	2005-08-22 14:30:17.000000000 +0200
***************
*** 1460,1466 ****
  		    if (init == NULL_TREE
  			|| step == NULL_TREE
  			|| TREE_CODE (init) != INTEGER_CST
! 			|| TREE_CODE (step) != INTEGER_CST)
  		      break;
  
  		    utype = unsigned_type_for (type);
--- 1460,1468 ----
  		    if (init == NULL_TREE
  			|| step == NULL_TREE
  			|| TREE_CODE (init) != INTEGER_CST
! 			|| TREE_CODE (step) != INTEGER_CST
! 			|| TYPE_MIN_VALUE (type) == NULL_TREE
! 			|| TYPE_MAX_VALUE (type) == NULL_TREE)
  		      break;
  
  		    utype = unsigned_type_for (type);

-- 


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


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