projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b8821d
)
* expr.c (store_constructor): Fix test for missing array elements.
author
Per Bothner
<bothner@gcc.gnu.org>
Tue, 23 Apr 1996 20:01:58 +0000
(13:01 -0700)
committer
Per Bothner
<bothner@gcc.gnu.org>
Tue, 23 Apr 1996 20:01:58 +0000
(13:01 -0700)
From-SVN: r11869
gcc/expr.c
patch
|
blob
|
history
diff --git
a/gcc/expr.c
b/gcc/expr.c
index f539b49ab08ca8feeac74c105d92f99071ba358d..278cfb36af4de1e39f103498f87d2b5dd7abbdcd 100644
(file)
--- a/
gcc/expr.c
+++ b/
gcc/expr.c
@@
-3488,7
+3488,10
@@
store_constructor (exp, target, cleared)
if (mostly_zeros_p (TREE_VALUE (elt)))
zero_count += this_node_count;
}
- if (4 * zero_count >= 3 * count)
+ /* Clear the entire array first if there are any missing elements,
+ or if the incidence of zero elements is >= 75%. */
+ if (count < maxelt - minelt + 1
+ || 4 * zero_count >= 3 * count)
need_to_clear = 1;
}
if (need_to_clear)