OSDN Git Service

(expand_builtin, case BUILT_IN_NEXT_ARG): Strip off INDIRECT_REF when
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 1996 13:42:23 +0000 (13:42 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 1996 13:42:23 +0000 (13:42 +0000)
checking second arg.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11139 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/expr.c

index 2fe100c..342fa37 100644 (file)
@@ -8047,10 +8047,13 @@ expand_builtin (exp, target, subtarget, mode, ignore)
            tree arg = TREE_VALUE (arglist);
 
            /* Strip off all nops for the sake of the comparison.  This
-              is not quite the same as STRIP_NOPS.  It does more.  */
+              is not quite the same as STRIP_NOPS.  It does more.  
+              We must also strip off INDIRECT_EXPR for C++ reference
+              parameters.  */
            while (TREE_CODE (arg) == NOP_EXPR
                   || TREE_CODE (arg) == CONVERT_EXPR
-                  || TREE_CODE (arg) == NON_LVALUE_EXPR)
+                  || TREE_CODE (arg) == NON_LVALUE_EXPR
+                  || TREE_CODE (arg) == INDIRECT_REF)
              arg = TREE_OPERAND (arg, 0);
            if (arg != last_parm)
              warning ("second parameter of `va_start' not last named argument");