constexpr.c (cxx_eval_call_expression): Don't add this call to the hash table if...
authorJason Merrill <jason@redhat.com>
Mon, 27 Jul 2015 16:57:21 +0000 (12:57 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 27 Jul 2015 16:57:21 +0000 (12:57 -0400)
* constexpr.c (cxx_eval_call_expression): Don't add this call to
the hash table if !depth_ok.

From-SVN: r226256

gcc/cp/ChangeLog
gcc/cp/constexpr.c

index 2c5fae1274d0c2106180e740cef6f1920d46bd91..78a6af2e0dc011ff6ad50bd3ac54fccd4fa1e2a0 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-27  Jason Merrill  <jason@redhat.com>
+
+       * constexpr.c (cxx_eval_call_expression): Don't add this call to
+       the hash table if !depth_ok.
+
 2015-07-27  Marek Polacek  <polacek@redhat.com>
 
        PR c++/66555
index fe962fee003662e3179b879f4bd53289fb274e07..2799cb7532857ded9ab245d021cd1a7776e670e7 100644 (file)
@@ -1289,7 +1289,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t,
   tree result = NULL_TREE;
 
   constexpr_call *entry = NULL;
-  if (!non_constant_args)
+  if (depth_ok && !non_constant_args)
     {
       new_call.hash = iterative_hash_template_arg
        (new_call.bindings, constexpr_fundef_hasher::hash (new_call.fundef));