diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-04-03 03:07:40 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-04-03 03:07:40 +0000 |
commit | b6f65e3c5dd79817b4255d4780fa2ca4e1274f95 (patch) | |
tree | 064485fefb93789485a6ad2a21503d015fe218a0 /gcc/varasm.c | |
parent | ce674fb62aac244b11351dbc9e4290107e33fd78 (diff) | |
download | gcc-b6f65e3c5dd79817b4255d4780fa2ca4e1274f95.zip gcc-b6f65e3c5dd79817b4255d4780fa2ca4e1274f95.tar.gz gcc-b6f65e3c5dd79817b4255d4780fa2ca4e1274f95.tar.bz2 |
builtins.c (dummy_object): Use build_int_cst instead of convert.
* builtins.c (dummy_object): Use build_int_cst instead of convert.
* tree-ssa-ccp.c (maybe_fold_stmt_addition): Use fold_convert
instead of convert.
* dojump.c (do_jump): Likewise.
* expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE): Likewise.
* gimplify.c (gimple_boolify, gimplify_init_constructor,
gimplify_boolean_expr): Likewise.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
* varasm.c (array_size_for_constructor): Likewise.
* tree-object-size.c (compute_object_offset): Likewise.
From-SVN: r112633
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 04fb52c..2d8a6bf 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4137,7 +4137,7 @@ array_size_for_constructor (tree val) { tree max_index, i; unsigned HOST_WIDE_INT cnt; - tree index, value; + tree index, value, tmp; /* This code used to attempt to handle string constants that are not arrays of single-bytes, but nothing else does, so there's no point in @@ -4158,9 +4158,9 @@ array_size_for_constructor (tree val) return 0; /* Compute the total number of array elements. */ - i = size_binop (MINUS_EXPR, convert (sizetype, max_index), - convert (sizetype, - TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (val))))); + tmp = TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (val))); + i = size_binop (MINUS_EXPR, fold_convert (sizetype, max_index), + fold_convert (sizetype, tmp)); i = size_binop (PLUS_EXPR, i, build_int_cst (sizetype, 1)); /* Multiply by the array element unit size to find number of bytes. */ |