diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2008-04-01 22:14:41 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2008-04-01 22:14:41 +0000 |
commit | 10743280477e38895d983bccb4e5cd80b16306af (patch) | |
tree | 08652b02353ba0265c7c10802a5d776195e92189 /gcc | |
parent | 7151ffbe56dd95cbd05e4e5c418468d30dc33c2f (diff) | |
download | gcc-10743280477e38895d983bccb4e5cd80b16306af.zip gcc-10743280477e38895d983bccb4e5cd80b16306af.tar.gz gcc-10743280477e38895d983bccb4e5cd80b16306af.tar.bz2 |
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
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 2ef5a6c..17a8ee5 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 9fa3137..14470c5 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) |