diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fold-const.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ef5a6c33de..17a8ee570be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR middle-end/35705 + * fold-const.c (get_pointer_modulus_and_residue): Return modulus 1 if + the expression is a function address. + 2008-04-01 George Helffrich <george@gcc.gnu.org> PR fortran/PR35154, fortran/PR23057 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) |