aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-01-31 08:42:23 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-01-31 08:42:23 -0500
commit6692a31fda3b8b9032658826e048ccc66ad72dae (patch)
tree0520efec61a149b5825efce22ee894210096fc79 /gcc/expr.c
parent3c758d821a49e53d1c4030adf5c780af2d18bf20 (diff)
downloadgcc-6692a31fda3b8b9032658826e048ccc66ad72dae.zip
gcc-6692a31fda3b8b9032658826e048ccc66ad72dae.tar.gz
gcc-6692a31fda3b8b9032658826e048ccc66ad72dae.tar.bz2
(expand_builtin, case BUILT_IN_NEXT_ARG): Strip off INDIRECT_REF when
checking second arg. From-SVN: r11139
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 2fe100c..342fa37 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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");