From 587f0f27d2cd20d79aed10ea923c52a80d278bd6 Mon Sep 17 00:00:00 2001 From: kenner Date: Fri, 23 Feb 2001 21:05:41 +0000 Subject: [PATCH] * fold-const.c (fold_convert): Don't call size_int_type_wide if input overflows. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40012 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 3 +++ gcc/fold-const.c | 1 + 2 files changed, 4 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ddce687..a89be70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Fri Feb 23 15:28:39 2001 Richard Kenner + * fold-const.c (fold_convert): Don't call size_int_type_wide if + input overflows. + * c-decl.c (set_block): Set NAMES and BLOCKS from BLOCK. * varasm.c (output_constant): Recompute CODE after lang-specific fn. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 99a602cd..69b9920 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2022,6 +2022,7 @@ fold_convert (t, arg1) /* 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) + && !TREE_CONSTANT_OVERFLOW (arg1) && compare_tree_int (arg1, 10000) < 0) return size_int_type_wide (TREE_INT_CST_LOW (arg1), type); -- 2.7.4