aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-01-11 14:23:20 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-01-11 14:23:20 +0000
commite98965af89226abc5926aa12a360b5fe32cf2ace (patch)
treed3fbfa09b4e46d2f7f3c93fdf49e3af511c1267d /gcc
parent9f9ca914cc827c34816c71afb04e920ad5243156 (diff)
downloadgcc-e98965af89226abc5926aa12a360b5fe32cf2ace.zip
gcc-e98965af89226abc5926aa12a360b5fe32cf2ace.tar.gz
gcc-e98965af89226abc5926aa12a360b5fe32cf2ace.tar.bz2
re PR tree-optimization/47239 ((int)&func & 3 is always optimized to 0 on some targets)
2011-01-11 Richard Guenther <rguenther@suse.de> PR tree-optimization/47239 * tree-ssa-ccp.c (get_value_from_alignment): Punt for FUNCTION_DECLs. From-SVN: r168661
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-ccp.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b372b6c..1a910c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47239
+ * tree-ssa-ccp.c (get_value_from_alignment): Punt for FUNCTION_DECLs.
+
2011-01-11 Jeff Law <law@redhat.com>
* PR tree-optimization/47086
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index b2494d7..57fc56d 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -522,6 +522,10 @@ get_value_from_alignment (tree expr)
val = bit_value_binop (PLUS_EXPR, TREE_TYPE (expr),
TREE_OPERAND (base, 0), TREE_OPERAND (base, 1));
else if (base
+ /* ??? While function decls have DECL_ALIGN their addresses
+ may encode extra information in the lower bits on some
+ targets (PR47239). Simply punt for function decls for now. */
+ && TREE_CODE (base) != FUNCTION_DECL
&& ((align = get_object_alignment (base, BIGGEST_ALIGNMENT))
> BITS_PER_UNIT))
{