From: Richard Kenner Date: Fri, 29 Dec 2000 17:18:22 +0000 (+0000) Subject: tree.c (get_set_constructor_bits): Use host_integerp and tree_low_cst. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5538d8a0043b1dc9abf08cbda0d27954f6931933;p=gcc.git tree.c (get_set_constructor_bits): Use host_integerp and tree_low_cst. * tree.c (get_set_constructor_bits): Use host_integerp and tree_low_cst. From-SVN: r38545 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1f2b7971823..c305c9b5c11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2000-12-29 Richard Kenner + * tree.c (get_set_constructor_bits): Use host_integerp and + tree_low_cst. + * local-alloc.c (update_equiv_regs): Don't use copy_rtx on PATTERN. * toplev.c (main): Call xmalloc_set_program_name. diff --git a/gcc/tree.c b/gcc/tree.c index acc744619b3..03cae0aaa21 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4578,26 +4578,27 @@ get_set_constructor_bits (init, buffer, bit_size) int i; tree vals; HOST_WIDE_INT domain_min - = TREE_INT_CST_LOW (TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (init)))); + = tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (init))), 0); tree non_const_bits = NULL_TREE; + for (i = 0; i < bit_size; i++) buffer[i] = 0; for (vals = TREE_OPERAND (init, 1); vals != NULL_TREE; vals = TREE_CHAIN (vals)) { - if (TREE_CODE (TREE_VALUE (vals)) != INTEGER_CST + if (!host_integerp (TREE_VALUE (vals), 0) || (TREE_PURPOSE (vals) != NULL_TREE - && TREE_CODE (TREE_PURPOSE (vals)) != INTEGER_CST)) + && !host_integerp (TREE_PURPOSE (vals), 0))) non_const_bits = tree_cons (TREE_PURPOSE (vals), TREE_VALUE (vals), non_const_bits); else if (TREE_PURPOSE (vals) != NULL_TREE) { /* Set a range of bits to ones. */ HOST_WIDE_INT lo_index - = TREE_INT_CST_LOW (TREE_PURPOSE (vals)) - domain_min; + = tree_low_cst (TREE_PURPOSE (vals), 0) - domain_min; HOST_WIDE_INT hi_index - = TREE_INT_CST_LOW (TREE_VALUE (vals)) - domain_min; + = tree_low_cst (TREE_VALUE (vals), 0) - domain_min; if (lo_index < 0 || lo_index >= bit_size || hi_index < 0 || hi_index >= bit_size) @@ -4609,7 +4610,7 @@ get_set_constructor_bits (init, buffer, bit_size) { /* Set a single bit to one. */ HOST_WIDE_INT index - = TREE_INT_CST_LOW (TREE_VALUE (vals)) - domain_min; + = tree_low_cst (TREE_VALUE (vals), 0) - domain_min; if (index < 0 || index >= bit_size) { error ("invalid initializer for bit string");