[Bug c++/68449] [5/6 Regression] ICE in cxx_eval_constant_expression on atomic_load in C++

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 8 11:40:00 GMT 2016


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think I'll post

--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -3195,7 +3195,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx,
tree t,
       if (VAR_P (r))
    if (tree *p = ctx->values->get (r))
      r = *p;
-      if (DECL_P (r))
+      if (r == NULL_TREE || DECL_P (r))
    {
      if (!ctx->quiet)
        non_const_var_error (r);


More information about the Gcc-bugs mailing list