* fold-const.c (build_range_check): Disable optimization for function
pointer expressions on targets that require function pointer
canonicalization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103145
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-08-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR middle-end/23369
+ * fold-const.c (build_range_check): Disable optimization for function
+ pointer expressions on targets that require function pointer
+ canonicalization.
+
2005-08-15 Ulrich Weigand <uweigand@de.ibm.com>
* simplify-rtx.c (simplify_const_relational_operation): When
tree etype = TREE_TYPE (exp);
tree value;
+#ifdef HAVE_canonicalize_funcptr_for_compare
+ /* Disable this optimization for function pointer expressions
+ on targets that require function pointer canonicalization. */
+ if (HAVE_canonicalize_funcptr_for_compare
+ && TREE_CODE (etype) == POINTER_TYPE
+ && TREE_CODE (TREE_TYPE (etype)) == FUNCTION_TYPE)
+ return NULL_TREE;
+#endif
+
if (! in_p)
{
value = build_range_check (type, exp, 1, low, high);