From: John David Anglin Date: Tue, 1 Apr 2008 22:14:41 +0000 (+0000) Subject: re PR middle-end/35705 (Symbol address check eliminated by C frontend.) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10743280477e38895d983bccb4e5cd80b16306af;p=gcc.git re PR middle-end/35705 (Symbol address check eliminated by C frontend.) PR middle-end/35705 * fold-const.c (get_pointer_modulus_and_residue): Return modulus 1 if the expression is a function address. From-SVN: r133804 --- 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 + + 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 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)