* cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
authorJason Merrill <jason@redhat.com>
Wed, 24 Feb 2016 15:17:58 +0000 (10:17 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 24 Feb 2016 15:17:58 +0000 (10:17 -0500)
From-SVN: r233671

gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c

index ca3b14b..582fd07 100644 (file)
@@ -1,3 +1,7 @@
+2016-02-24  Jason Merrill  <jason@redhat.com>
+
+       * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
+
 2016-02-19  Jason Merrill  <jason@redhat.com>
 
        PR c++/69743
index 34bdc82..c59cd90 100644 (file)
@@ -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;