aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 65c75f6..02aa484 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -7942,7 +7942,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
if (TREE_CODE (op0) == ADDR_EXPR)
{
tree op00 = TREE_OPERAND (op0, 0);
- if ((TREE_CODE (op00) == VAR_DECL
+ if ((VAR_P (op00)
|| TREE_CODE (op00) == PARM_DECL
|| TREE_CODE (op00) == RESULT_DECL)
&& !TREE_READONLY (op00))