re PR middle-end/35705 (Symbol address check eliminated by C frontend.)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Tue, 1 Apr 2008 22:14:41 +0000 (22:14 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 1 Apr 2008 22:14:41 +0000 (22:14 +0000)
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

gcc/ChangeLog
gcc/fold-const.c

index 2ef5a6c33de06307f42fe5d8e5a74769682bde7c..17a8ee570be86e4962e5d98376ce8192e924c3f6 100644 (file)
@@ -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
index 9fa31376864f6c33a865050968b7d4a793c8055d..14470c5fd12e16134017d0c9de03d2418456b46b 100644 (file)
@@ -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)