&& immediate_const_ctor_p (DECL_INITIAL (tree_value)))
{
rtx target = gen_reg_rtx (word_mode);
- rtx x = expand_expr (DECL_INITIAL (tree_value),
- target, word_mode, EXPAND_NORMAL);
+ store_constructor (DECL_INITIAL (tree_value), target, 0,
+ int_expr_size (DECL_INITIAL (tree_value)),
+ false);
reg = gen_rtx_REG (word_mode, REGNO (reg));
- emit_move_insn (reg, x);
+ emit_move_insn (reg, target);
}
else if (partial == 0 || args[i].pass_on_stack)
{
static void clear_by_pieces (rtx, unsigned HOST_WIDE_INT, unsigned int);
static rtx_insn *compress_float_constant (rtx, rtx);
static rtx get_subtarget (rtx);
-static void store_constructor (tree, rtx, int, poly_int64, bool);
static rtx store_field (rtx, poly_int64, poly_int64, poly_uint64, poly_uint64,
machine_mode, tree, alias_set_type, bool, bool);
profile_probability);
static rtx const_vector_from_tree (tree);
static tree tree_expr_size (const_tree);
-static HOST_WIDE_INT int_expr_size (const_tree);
static void convert_mode_scalar (rtx, rtx, int);
\f
which has been packed to exclude padding bits.
If REVERSE is true, the store is to be done in reverse order. */
-static void
+void
store_constructor (tree exp, rtx target, int cleared, poly_int64 size,
bool reverse)
{
/* Return a wide integer for the size in bytes of the value of EXP, or -1
if the size can vary or is larger than an integer. */
-static HOST_WIDE_INT
+HOST_WIDE_INT
int_expr_size (const_tree exp)
{
tree size;
HOST_WIDE_INT *, HOST_WIDE_INT *,
bool *);
extern bool immediate_const_ctor_p (const_tree, unsigned int words = 1);
+extern void store_constructor (tree, rtx, int, poly_int64, bool);
+extern HOST_WIDE_INT int_expr_size (const_tree exp);
extern void expand_operands (tree, tree, rtx, rtx*, rtx*,
enum expand_modifier);
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct {
+ struct {
+ short e16[3];
+ }
+} const eth_addr_zero = {{}}; /* { dg-warning "no semicolon at" } */
+void compose_nd_na_ipv6_src() {
+ packet_set_nd(eth_addr_zero); /* { dg-warning "implicit declaration" } */
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+#pragma pack(1)
+struct {
+ unsigned f0;
+} static g_251 = {6};
+void g_329_3() {
+ func_19(g_251); /* { dg-warning "implicit declaration" } */
+}
+