]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* 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 ca3b14bff1fce49c569ba827e4ccf990e3882c60..582fd076189d85695283790770a7a6aa53add47f 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 34bdc827432ebe57d8d8cb554478dabcc8668737..c59cd90063e4f01a62ccc5b2ecda7d43f2023b7c 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;