patches/gcc/4.3.0/250-pr35705.patch
changeset 747 d3e603e7c17c
parent 746 b150d6f590fc
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.3.0/250-pr35705.patch	Mon Jul 28 21:32:33 2008 +0000
     1.3 @@ -0,0 +1,21 @@
     1.4 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/63_all_gcc43-pr35705.patch
     1.5 +http://gcc.gnu.org/PR35705
     1.6 +
     1.7 +2008-04-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
     1.8 +
     1.9 +	PR middle-end/35705
    1.10 +	* fold-const.c (get_pointer_modulus_and_residue): Return modulus 1 if
    1.11 +	the expression is a function address.
    1.12 +
    1.13 +diff -durN gcc-4.3.0.orig/gcc/fold-const.c gcc-4.3.0/gcc/fold-const.c
    1.14 +--- gcc-4.3.0.orig/gcc/fold-const.c	2008-02-27 15:12:33.000000000 +0100
    1.15 ++++ gcc-4.3.0/gcc/fold-const.c	2008-06-10 14:45:09.000000000 +0200
    1.16 +@@ -9357,7 +9357,7 @@
    1.17 + 	    }
    1.18 + 	}
    1.19 + 
    1.20 +-      if (DECL_P (expr))
    1.21 ++      if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL)
    1.22 + 	return DECL_ALIGN_UNIT (expr);
    1.23 +     }
    1.24 +   else if (code == POINTER_PLUS_EXPR)