aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 2256ac9..e6d110d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5186,7 +5186,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
if (TREE_CODE (from) == CALL_EXPR && ! aggregate_value_p (from, from)
&& COMPLETE_TYPE_P (TREE_TYPE (from))
&& TREE_CODE (TYPE_SIZE (TREE_TYPE (from))) == INTEGER_CST
- && ! (((TREE_CODE (to) == VAR_DECL
+ && ! (((VAR_P (to)
|| TREE_CODE (to) == PARM_DECL
|| TREE_CODE (to) == RESULT_DECL)
&& REG_P (DECL_RTL (to)))
@@ -8421,7 +8421,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode,
if (TREE_CODE (treeop0) == PLUS_EXPR
&& TREE_CODE (TREE_OPERAND (treeop0, 1)) == INTEGER_CST
- && TREE_CODE (treeop1) == VAR_DECL
+ && VAR_P (treeop1)
&& (DECL_RTL (treeop1) == frame_pointer_rtx
|| DECL_RTL (treeop1) == stack_pointer_rtx
|| DECL_RTL (treeop1) == arg_pointer_rtx))
@@ -10201,8 +10201,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
&& modifier != EXPAND_MEMORY
&& TREE_READONLY (array) && ! TREE_SIDE_EFFECTS (array)
&& TREE_CODE (index) == INTEGER_CST
- && (TREE_CODE (array) == VAR_DECL
- || TREE_CODE (array) == CONST_DECL)
+ && (VAR_P (array) || TREE_CODE (array) == CONST_DECL)
&& (init = ctor_for_folding (array)) != error_mark_node)
{
if (init == NULL_TREE)
@@ -11112,8 +11111,7 @@ string_constant (tree arg, tree *ptr_offset)
{
array = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
offset = TREE_OPERAND (TREE_OPERAND (arg, 0), 1);
- if (TREE_CODE (array) != STRING_CST
- && TREE_CODE (array) != VAR_DECL)
+ if (TREE_CODE (array) != STRING_CST && !VAR_P (array))
return 0;
/* Check if the array has a nonzero lower bound. */
@@ -11137,8 +11135,7 @@ string_constant (tree arg, tree *ptr_offset)
if (TREE_CODE (array) != ADDR_EXPR)
return 0;
array = TREE_OPERAND (array, 0);
- if (TREE_CODE (array) != STRING_CST
- && TREE_CODE (array) != VAR_DECL)
+ if (TREE_CODE (array) != STRING_CST && !VAR_P (array))
return 0;
}
else
@@ -11177,8 +11174,7 @@ string_constant (tree arg, tree *ptr_offset)
*ptr_offset = fold_convert (sizetype, offset);
return array;
}
- else if (TREE_CODE (array) == VAR_DECL
- || TREE_CODE (array) == CONST_DECL)
+ else if (VAR_P (array) || TREE_CODE (array) == CONST_DECL)
{
int length;
tree init = ctor_for_folding (array);