diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-27 09:33:06 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-27 09:33:06 +0000 |
commit | 212999c0dfb72cc801a3510e126ce9487f299b5a (patch) | |
tree | 9a1ad68c73f727bde3503eefc6ef4d5afc51c17d /gcc/fold-const.c | |
parent | d8c1bee6457b09f4ce43952c56aac6ff593ca825 (diff) | |
download | gcc-212999c0dfb72cc801a3510e126ce9487f299b5a.tar.gz |
gcc/
2011-07-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49169
* fold-const.c (get_pointer_modulus_and_residue): Don't rely on
the alignment of function decls.
gcc/testsuite/
2011-07-24 Michael Hope <michael.hope@linaro.org>
Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/49169
* gcc.dg/torture/pr49169.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e48aae9f4ce..9428c11e4ac 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9216,7 +9216,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue, *residue = 0; code = TREE_CODE (expr); - if (code == ADDR_EXPR) + if (code == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (expr, 0)) != FUNCTION_DECL) { unsigned int bitalign; bitalign = get_object_alignment_1 (TREE_OPERAND (expr, 0), residue); |