re PR c++/90383 (GCC generates invalid constexpr copy/move assignment operators for...
authorJakub Jelinek <jakub@redhat.com>
Fri, 10 May 2019 08:19:44 +0000 (10:19 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 10 May 2019 08:19:44 +0000 (10:19 +0200)
commitb5cbaee240380ba1a3a48fad3810409dea32b888
treeb139f71ecf5589c0f08d1eb5288164013361f0d1
parent0a52429609a9570149af903c231c25f17da79b15
re PR c++/90383 (GCC generates invalid constexpr copy/move assignment operators for types with trailing padding. (Again))

PR c++/90383
* tree-inline.h (struct copy_body_data): Add do_not_fold member.
* tree-inline.c (remap_gimple_op_r): Avoid folding expressions if
id->do_not_fold.
(copy_tree_body_r): Likewise.
(copy_fn): Set id.do_not_fold to true.

* g++.dg/cpp1y/constexpr-90383-1.C: New test.
* g++.dg/cpp1y/constexpr-90383-2.C: New test.

From-SVN: r271058
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-90383-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-90383-2.C [new file with mode: 0644]
gcc/tree-inline.c
gcc/tree-inline.h