+2015-10-25 John David Anglin <danglin@gcc.gnu.org>
+
+ PR middle-end/68079
+ * dojump.c (do_compare_and_jump): Canonicalize both function and
+ method types.
+
2015-10-25 Uros Bizjak <ubizjak@gmail.com>
PR target/68084
If one side isn't, we want a noncanonicalized comparison. See PR
middle-end/17564. */
if (targetm.have_canonicalize_funcptr_for_compare ()
- && TREE_CODE (TREE_TYPE (treeop0)) == POINTER_TYPE
- && TREE_CODE (TREE_TYPE (TREE_TYPE (treeop0)))
- == FUNCTION_TYPE
- && TREE_CODE (TREE_TYPE (treeop1)) == POINTER_TYPE
- && TREE_CODE (TREE_TYPE (TREE_TYPE (treeop1)))
- == FUNCTION_TYPE)
+ && POINTER_TYPE_P (TREE_TYPE (treeop0))
+ && POINTER_TYPE_P (TREE_TYPE (treeop1))
+ && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (treeop0)))
+ && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (treeop1))))
{
rtx new_op0 = gen_reg_rtx (mode);
rtx new_op1 = gen_reg_rtx (mode);