From b5cbaee240380ba1a3a48fad3810409dea32b888 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 10 May 2019 10:19:44 +0200 Subject: 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/tree-inline.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/tree-inline.h') 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; -- cgit v1.1