OSDN Git Service

2011-01-11 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Jan 2011 14:23:20 +0000 (14:23 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Jan 2011 14:23:20 +0000 (14:23 +0000)
PR tree-optimization/47239
* tree-ssa-ccp.c (get_value_from_alignment): Punt for FUNCTION_DECLs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168661 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-ccp.c

index b372b6c..1a910c4 100644 (file)
@@ -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
index b2494d7..57fc56d 100644 (file)
@@ -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))
     {