[Bug c++/28886] [4.1/4.2 regression] Template specialization with array rejected

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 30 05:25:00 GMT 2006



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-08-30 05:25 -------
Here is the fix which I am testing, it just strips off the NON_LVALUE_EXPR that
fold will produce:
Index: pt.c
===================================================================
--- pt.c        (revision 116576)
+++ pt.c        (working copy)
@@ -10627,6 +10627,8 @@ unify (tree tparms, tree targs, tree par
                                     integer_type_node,
                                     arg_max,
                                     TREE_OPERAND (parm_max, 1));
+             /* Strip the NON_LVALUE_EXPRs that could show up via fold.  */
+             STRIP_TYPE_NOPS (arg_max);
              parm_max = TREE_OPERAND (parm_max, 0);
            }


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28886



More information about the Gcc-bugs mailing list