From: Jason Merrill Date: Wed, 24 Feb 2016 15:17:58 +0000 (-0500) Subject: * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28577b86833bdb2e5241790f233fd2503ab4f880;p=gcc.git * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline. From-SVN: r233671 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ca3b14bff1f..582fd076189 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2016-02-24 Jason Merrill + + * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline. + 2016-02-19 Jason Merrill PR c++/69743 diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 34bdc827432..c59cd90063e 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -2154,7 +2154,8 @@ cp_fold (tree x) TODO: Do constexpr expansion of expressions where the call itself is not constant, but the call followed by an INDIRECT_REF is. */ - if (callee && DECL_DECLARED_CONSTEXPR_P (callee)) + if (callee && DECL_DECLARED_CONSTEXPR_P (callee) + && !flag_no_inline) r = maybe_constant_value (x); optimize = sv;