diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 6b4b6a4..3a6d1b1 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4956,8 +4956,8 @@ build_range_check (location_t loc, tree type, tree exp, int in_p, /* Disable this optimization for function pointer expressions on targets that require function pointer canonicalization. */ if (targetm.have_canonicalize_funcptr_for_compare () - && TREE_CODE (etype) == POINTER_TYPE - && TREE_CODE (TREE_TYPE (etype)) == FUNCTION_TYPE) + && POINTER_TYPE_P (etype) + && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (etype))) return NULL_TREE; if (! in_p) |