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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot 
gnu.org

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
I am testing:

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c2b581c0f82..0a7397b742f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -21898,8 +21898,10 @@ static bool uses_deducible_template_parms (tree type);
 static bool
 deducible_expression (tree expr)
 {
-  /* Strip implicit conversions.  */
-  while (CONVERT_EXPR_P (expr) || TREE_CODE (expr) == VIEW_CONVERT_EXPR)
+  /* Strip implicit conversions and implicit INDIRECT_REFs.  */
+  while (CONVERT_EXPR_P (expr)
+        || TREE_CODE (expr) == VIEW_CONVERT_EXPR
+        || REFERENCE_REF_P (expr))
     expr = TREE_OPERAND (expr, 0);
   return (TREE_CODE (expr) == TEMPLATE_PARM_INDEX);
 }

Reply via email to