This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Typo in fold_const.c
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Typo in fold_const.c
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 02 Jan 2001 16:20:39 -0800
- Organization: CodeSourcery, LLC
This patch fixes a typo in fold_const.c. We were trying to cache
small integers, but failing because a TREE_TYPE is never INTEGER_CST.
Some day, we should actually make the tree system a good bit more
typesafe...
Tested on i686-pc-linux-gnu.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2001-01-02 Mark Mitchell <mark@codesourcery.com>
* fold-const.c (fold_convert): Fix typo.
Index: fold-const.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v
retrieving revision 1.143
diff -c -p -r1.143 fold-const.c
*** fold-const.c 2000/12/19 01:17:20 1.143
--- fold-const.c 2001/01/02 23:59:22
*************** fold_convert (t, arg1)
*** 2020,2026 ****
/* If we are trying to make a sizetype for a small integer, use
size_int to pick up cached types to reduce duplicate nodes. */
! if (TREE_CODE (type) == INTEGER_CST && TYPE_IS_SIZETYPE (type)
&& compare_tree_int (arg1, 10000) < 0)
return size_int_type_wide (TREE_INT_CST_LOW (arg1), type);
--- 2020,2026 ----
/* If we are trying to make a sizetype for a small integer, use
size_int to pick up cached types to reduce duplicate nodes. */
! if (TREE_CODE (type) == INTEGER_TYPE && TYPE_IS_SIZETYPE (type)
&& compare_tree_int (arg1, 10000) < 0)
return size_int_type_wide (TREE_INT_CST_LOW (arg1), type);