re PR middle-end/68079 (hppa: pointers to method types need canonicalization before...
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 25 Oct 2015 15:18:48 +0000 (15:18 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 25 Oct 2015 15:18:48 +0000 (15:18 +0000)
PR middle-end/68079
* dojump.c (do_compare_and_jump): Canonicalize both function and
method types.

From-SVN: r229299

gcc/ChangeLog
gcc/dojump.c

index 02f71b941b093ca71aae9553b9e16ba0226b01ba..0f6ddda570efb65b2a9e3ac173a70489298617ef 100644 (file)
@@ -1,3 +1,9 @@
+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
index 6adc1a653cc38bdc82d7a7aa0416d5569d3d427e..d767320a10256a312d24875bd3576b3bdd71f039 100644 (file)
@@ -1207,12 +1207,10 @@ do_compare_and_jump (tree treeop0, tree treeop1, enum rtx_code signed_code,
      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);