Commit 6e085858 by Jason Merrill Committed by Jason Merrill

Fix get_target_expr for bit-field expressions.

	* tree.c (get_target_expr_sfinae): Handle bit-fields.
	(build_target_expr): Call mark_rvalue_use.

From-SVN: r237773
parent 65e009bb
2016-06-24 Jason Merrill <jason@redhat.com>
* tree.c (get_target_expr_sfinae): Handle bit-fields.
(build_target_expr): Call mark_rvalue_use.
2016-06-24 Jakub Jelinek <jakub@redhat.com>
* call.c (magic_varargs_p): Return 3 for __builtin_*_overflow_p.
......
......@@ -377,6 +377,8 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain)
tree t;
tree type = TREE_TYPE (decl);
value = mark_rvalue_use (value);
gcc_checking_assert (VOID_TYPE_P (TREE_TYPE (value))
|| TREE_TYPE (decl) == TREE_TYPE (value)
/* On ARM ctors return 'this'. */
......@@ -729,7 +731,10 @@ get_target_expr_sfinae (tree init, tsubst_flags_t complain)
else if (TREE_CODE (init) == VEC_INIT_EXPR)
return build_target_expr (VEC_INIT_EXPR_SLOT (init), init, complain);
else
return build_target_expr_with_type (init, TREE_TYPE (init), complain);
{
init = convert_bitfield_to_declared_type (init);
return build_target_expr_with_type (init, TREE_TYPE (init), complain);
}
}
tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment