summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-01 22:14:41 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-01 22:14:41 +0000
commit10494d65ed148c0b31cc6e4f1682ea9c869c094e (patch)
tree08652b02353ba0265c7c10802a5d776195e92189 /gcc/fold-const.c
parenta12691f04417212547b7b3d3ad11680dda74a871 (diff)
downloadgcc-10494d65ed148c0b31cc6e4f1682ea9c869c094e.tar.gz
PR middle-end/35705
* fold-const.c (get_pointer_modulus_and_residue): Return modulus 1 if the expression is a function address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133804 138bc75d-0d04-0410-961f-82ee72b054a4
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 9fa31376864..14470c5fd12 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -9090,7 +9090,7 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue)
}
}
- if (DECL_P (expr))
+ if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL)
return DECL_ALIGN_UNIT (expr);
}
else if (code == POINTER_PLUS_EXPR)