The attached change fixes a bug compiling the qtbase-opensource-src package.  
It compares pointers
to method types.  This failed as only FUNCTION_TYPES were canonicalized on hppa.

On 32-bit hppa, pointers to functions including methods point to non unique 
function descriptors and need
canonicalization prior to comparison.  The attached change fixes this problem.  
32-bit hppa is the only
target that currently needs this canonicalization.

Tested on hppa2.0w-hp-hpux11.11 and hppa-unknown-linux-gnu with no observed 
regressions.  Committed
to trunk.

Dave
--
John David Anglin       dave.ang...@bell.net


2015-10-25  John David Anglin  <dang...@gcc.gnu.org>

        PR middle-end/68079
        * dojump.c (do_compare_and_jump): Canonicalize both function and
        method types.

Index: dojump.c
===================================================================
--- dojump.c    (revision 229123)
+++ dojump.c    (working copy)
@@ -1207,12 +1207,10 @@
      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);

Reply via email to