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

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

--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6542,6 +6542,7 @@ check_valid_ptrmem_cst_expr (tree type, tree expr,
 static bool
 has_value_dependent_address (tree op)
 {
+  STRIP_ANY_LOCATION_WRAPPER (op);
   /* We could use get_inner_reference here, but there's no need;
      this is only relevant for template non-type arguments, which
      can only be expressed as &id-expression.  */

Reply via email to