[Bug c++/117980] [15 Regression] ICE in in cxx_eval_outermost_constant_expr, at cp/constexpr.cc:8950 on nix-2.25.2 since r15-6052-g12de1942a0a673

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 10 20:24:45 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117980

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Candidate fix:

--- a/gcc/cp/cp-gimplify.cc
+++ b/gcc/cp/cp-gimplify.cc
@@ -1477,7 +1477,7 @@ cp_fold_r (tree *stmt_p, int *walk_subtrees, void *data_)
      *walk_subtrees = 0;
      if (!flag_no_inline)
        {
-         tree folded = maybe_constant_init (init, TARGET_EXPR_SLOT (stmt));
+         tree folded = maybe_constant_init (init);
          if (folded != init && TREE_CONSTANT (folded))
        init = folded;
        }


More information about the Gcc-bugs mailing list