diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-05-10 10:19:44 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-05-10 10:19:44 +0200 |
commit | b5cbaee240380ba1a3a48fad3810409dea32b888 (patch) | |
tree | b139f71ecf5589c0f08d1eb5288164013361f0d1 /gcc/tree-inline.h | |
parent | 0a52429609a9570149af903c231c25f17da79b15 (diff) | |
download | gcc-b5cbaee240380ba1a3a48fad3810409dea32b888.zip gcc-b5cbaee240380ba1a3a48fad3810409dea32b888.tar.gz gcc-b5cbaee240380ba1a3a48fad3810409dea32b888.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-inline.h')
-rw-r--r-- | gcc/tree-inline.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index 4c954a0..3ede89e 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -113,6 +113,9 @@ struct copy_body_data /* True if trees may not be unshared. */ bool do_not_unshare; + /* True if trees should not be folded during the copying. */ + bool do_not_fold; + /* True if new declarations may not be created during type remapping. */ bool prevent_decl_creation_for_types; |