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-Tag: releases/gcc-4.4.0~5720 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10743280477e38895d983bccb4e5cd80b16306af;p=thirdparty%2Fgcc.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 2ef5a6c33de0..17a8ee570be8 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 9fa31376864f..14470c5fd12e 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)