mirror of git://gcc.gnu.org/git/gcc.git
re PR target/54631 (vxworks.c fails to compile)
PR target/54631 * config/vxworks.c (vxworks_emutls_var_init): Update for new VEC_quick_push interface. From-SVN: r191574
This commit is contained in:
parent
f2ea3c151c
commit
fc1bc21b52
|
|
@ -1,3 +1,9 @@
|
||||||
|
2012-09-20 Diego Novillo <dnovillo@google.com>
|
||||||
|
|
||||||
|
PR target/54631
|
||||||
|
* config/vxworks.c (vxworks_emutls_var_init): Update for new
|
||||||
|
VEC_quick_push interface.
|
||||||
|
|
||||||
2012-09-20 Richard Guenther <rguenther@suse.de>
|
2012-09-20 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/54634
|
PR tree-optimization/54634
|
||||||
|
|
|
||||||
|
|
@ -97,24 +97,22 @@ static tree
|
||||||
vxworks_emutls_var_init (tree var, tree decl, tree tmpl_addr)
|
vxworks_emutls_var_init (tree var, tree decl, tree tmpl_addr)
|
||||||
{
|
{
|
||||||
VEC(constructor_elt,gc) *v = VEC_alloc (constructor_elt, gc, 3);
|
VEC(constructor_elt,gc) *v = VEC_alloc (constructor_elt, gc, 3);
|
||||||
constructor_elt *elt;
|
|
||||||
|
|
||||||
tree type = TREE_TYPE (var);
|
tree type = TREE_TYPE (var);
|
||||||
tree field = TYPE_FIELDS (type);
|
tree field = TYPE_FIELDS (type);
|
||||||
|
|
||||||
elt = VEC_quick_push (constructor_elt, v, NULL);
|
constructor_elt elt = {field, fold_convert (TREE_TYPE (field), tmpl_addr)};
|
||||||
elt->index = field;
|
VEC_quick_push (constructor_elt, v, elt);
|
||||||
elt->value = fold_convert (TREE_TYPE (field), tmpl_addr);
|
|
||||||
|
|
||||||
elt = VEC_quick_push (constructor_elt, v, NULL);
|
|
||||||
field = DECL_CHAIN (field);
|
field = DECL_CHAIN (field);
|
||||||
elt->index = field;
|
elt.index = field;
|
||||||
elt->value = build_int_cst (TREE_TYPE (field), 0);
|
elt.value = build_int_cst (TREE_TYPE (field), 0);
|
||||||
|
VEC_quick_push (constructor_elt, v, elt);
|
||||||
|
|
||||||
elt = VEC_quick_push (constructor_elt, v, NULL);
|
|
||||||
field = DECL_CHAIN (field);
|
field = DECL_CHAIN (field);
|
||||||
elt->index = field;
|
elt.index = field;
|
||||||
elt->value = fold_convert (TREE_TYPE (field), DECL_SIZE_UNIT (decl));
|
elt.value = fold_convert (TREE_TYPE (field), DECL_SIZE_UNIT (decl));
|
||||||
|
VEC_quick_push (constructor_elt, v, elt);
|
||||||
|
|
||||||
return build_constructor (type, v);
|
return build_constructor (type, v);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue