This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23511] [4.1 Regression] Segfault in fold_binary
- From: "sebastian dot pop at cri dot ensmp dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Aug 2005 12:34:56 -0000
- Subject: [Bug tree-optimization/23511] [4.1 Regression] Segfault in fold_binary
- References: <20050822050024.23511.aj@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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