projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b46230
)
(output_init_element): When adding to constructor_pending_elts, copy field.
author
Richard Stallman
<rms@gnu.org>
Wed, 8 Sep 1993 10:36:19 +0000
(10:36 +0000)
committer
Richard Stallman
<rms@gnu.org>
Wed, 8 Sep 1993 10:36:19 +0000
(10:36 +0000)
From-SVN: r5281
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index 40207c4404e120d6e561517861abce5588088a10..db66823719c317488a486fc9e6a47fd4cd391bb7 100644
(file)
--- a/
gcc/c-typeck.c
+++ b/
gcc/c-typeck.c
@@
-5822,8
+5822,10
@@
output_init_element (value, type, field, pending)
&& !tree_int_cst_equal (field, constructor_unfilled_index))
{
if (! duplicate)
+ /* The copy_node is needed in case field is actually
+ constructor_index, which is modified in place. */
constructor_pending_elts
- = tree_cons (
field
,
+ = tree_cons (
copy_node (field)
,
digest_init (type, value, 0, 0),
constructor_pending_elts);
}