OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
858b443
)
(output_init_element): When adding to constructor_pending_elts, copy field.
author
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Sep 1993 10:36:19 +0000
(10:36 +0000)
committer
rms
<rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Sep 1993 10:36:19 +0000
(10:36 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5281
138bc75d
-0d04-0410-961f-
82ee72b054a4
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index
40207c4
..
db66823
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);
}