Commit d276da0c by Jason Merrill Committed by Jason Merrill

PR c++/80972 - C++17 ICE with attribute packed.

	* call.c (build_over_call): Allow a TARGET_EXPR from reference
	binding.

From-SVN: r249420
parent 1e5d2102
2017-06-20 Jason Merrill <jason@redhat.com>
PR c++/80972 - C++17 ICE with attribute packed.
* call.c (build_over_call): Allow a TARGET_EXPR from reference
binding.
2017-06-20 Nathan Sidwell <nathan@acm.org> 2017-06-20 Nathan Sidwell <nathan@acm.org>
* cp-tree.h (CPTI_NELTS_IDENTIFIER): Delete. * cp-tree.h (CPTI_NELTS_IDENTIFIER): Delete.
......
...@@ -8025,6 +8025,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) ...@@ -8025,6 +8025,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
subobject. */ subobject. */
if (CHECKING_P && cxx_dialect >= cxx1z) if (CHECKING_P && cxx_dialect >= cxx1z)
gcc_assert (TREE_CODE (arg) != TARGET_EXPR gcc_assert (TREE_CODE (arg) != TARGET_EXPR
/* It's from binding the ref parm to a packed field. */
|| convs[0]->need_temporary_p
|| seen_error () || seen_error ()
/* See unsafe_copy_elision_p. */ /* See unsafe_copy_elision_p. */
|| DECL_BASE_CONSTRUCTOR_P (fn)); || DECL_BASE_CONSTRUCTOR_P (fn));
......
// PR c++/80972
struct A { int i; };
struct B { A a; } __attribute__((packed));
A a = B().a;
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