diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2015-10-25 15:18:48 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2015-10-25 15:18:48 +0000 |
commit | a89905fdd212bae10c6bc55662dec330e9a07b3e (patch) | |
tree | 8fdb84b7b8a5bcbffc695826abe0956de2421e9d /gcc/dojump.c | |
parent | fa788aea5387b066df50efa36810d7600063e7f1 (diff) | |
download | gcc-a89905fdd212bae10c6bc55662dec330e9a07b3e.zip gcc-a89905fdd212bae10c6bc55662dec330e9a07b3e.tar.gz gcc-a89905fdd212bae10c6bc55662dec330e9a07b3e.tar.bz2 |
re PR middle-end/68079 (hppa: pointers to method types need canonicalization before comparison)
PR middle-end/68079
* dojump.c (do_compare_and_jump): Canonicalize both function and
method types.
From-SVN: r229299
Diffstat (limited to 'gcc/dojump.c')
-rw-r--r-- | gcc/dojump.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/dojump.c b/gcc/dojump.c index 6adc1a6..d767320 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -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); |