aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/optimize.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-01-26 16:34:16 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-01-26 16:34:16 -0500
commitca30abcd13617314b7de526da03802639a2a7fc7 (patch)
tree39f30693c0fcb67ca9098ca43ad7fe4576d05c26 /gcc/cp/optimize.c
parent2d63bc398f7221edbec3e3f1d4ecbacac87cb3a5 (diff)
downloadgcc-ca30abcd13617314b7de526da03802639a2a7fc7.zip
gcc-ca30abcd13617314b7de526da03802639a2a7fc7.tar.gz
gcc-ca30abcd13617314b7de526da03802639a2a7fc7.tar.bz2
re PR c++/68949 (Implicit initialization of array member silently miscompiling.)
PR c++/68949 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body. (cxx_eval_call_expression): Don't look through clones. * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias. * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of maybe-in-charge *tor. From-SVN: r232848
Diffstat (limited to 'gcc/cp/optimize.c')
-rw-r--r--gcc/cp/optimize.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 9d3e2c3..6f80b3d 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -646,6 +646,8 @@ maybe_clone_body (tree fn)
{
if (expand_or_defer_fn_1 (clone))
emit_associated_thunks (clone);
+ /* We didn't generate a body, so remove the empty one. */
+ DECL_SAVED_TREE (clone) = NULL_TREE;
}
else
expand_or_defer_fn (clone);