aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 3cde5f5..f7dc9cb 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -49,6 +49,7 @@ Boston, MA 02111-1307, USA. */
#include "tree.h"
#include "rtl.h"
#include "toplev.h"
+#include "ggc.h"
static void encode PROTO((HOST_WIDE_INT *,
HOST_WIDE_INT, HOST_WIDE_INT));
@@ -1692,29 +1693,32 @@ size_int_wide (number, high, bit_p)
unsigned HOST_WIDE_INT number, high;
int bit_p;
{
- register tree t;
- /* Type-size nodes already made for small sizes. */
- static tree size_table[2*HOST_BITS_PER_WIDE_INT + 1][2];
-
- if (number < 2*HOST_BITS_PER_WIDE_INT + 1 && ! high
- && size_table[number][bit_p] != 0)
- return size_table[number][bit_p];
- if (number < 2*HOST_BITS_PER_WIDE_INT + 1 && ! high)
- {
- push_obstacks_nochange ();
- /* Make this a permanent node. */
- end_temporary_allocation ();
- t = build_int_2 (number, 0);
- TREE_TYPE (t) = bit_p ? bitsizetype : sizetype;
- size_table[number][bit_p] = t;
- pop_obstacks ();
- }
- else
+ tree t;
+
+ if (!ggc_p)
{
- t = build_int_2 (number, high);
- TREE_TYPE (t) = bit_p ? bitsizetype : sizetype;
- TREE_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (t) = force_fit_type (t, 0);
+ /* Type-size nodes already made for small sizes. */
+ static tree size_table[2*HOST_BITS_PER_WIDE_INT + 1][2];
+
+ if (number < 2*HOST_BITS_PER_WIDE_INT + 1 && ! high
+ && size_table[number][bit_p] != 0)
+ return size_table[number][bit_p];
+ if (number < 2*HOST_BITS_PER_WIDE_INT + 1 && ! high)
+ {
+ push_obstacks_nochange ();
+ /* Make this a permanent node. */
+ end_temporary_allocation ();
+ t = build_int_2 (number, 0);
+ TREE_TYPE (t) = bit_p ? bitsizetype : sizetype;
+ size_table[number][bit_p] = t;
+ pop_obstacks ();
+ return t;
+ }
}
+
+ t = build_int_2 (number, high);
+ TREE_TYPE (t) = bit_p ? bitsizetype : sizetype;
+ TREE_OVERFLOW (t) = TREE_CONSTANT_OVERFLOW (t) = force_fit_type (t, 0);
return t;
}