PR c++/80972 - C++17 ICE with attribute packed.
* call.c (build_over_call): Allow a TARGET_EXPR from reference binding. From-SVN: r249420
This commit is contained in:
parent
1e5d210275
commit
d276da0cf5
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* cp-tree.h (CPTI_NELTS_IDENTIFIER): Delete.
|
||||
|
|
|
@ -8025,6 +8025,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
|
|||
subobject. */
|
||||
if (CHECKING_P && cxx_dialect >= cxx1z)
|
||||
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 ()
|
||||
/* See unsafe_copy_elision_p. */
|
||||
|| DECL_BASE_CONSTRUCTOR_P (fn));
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// PR c++/80972
|
||||
|
||||
struct A { int i; };
|
||||
struct B { A a; } __attribute__((packed));
|
||||
|
||||
A a = B().a;
|
Loading…
Reference in New Issue