[Bug middle-end/87188] Function pointer canonicalization optimized away

2018-11-20 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188

John David Anglin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #28 from John David Anglin  ---
Fixed on gcc-8 and later.

[Bug middle-end/87188] Function pointer canonicalization optimized away

2018-11-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #27 from Martin Liška  ---
John: Can the bug be marked as resolved?

[Bug middle-end/87188] Function pointer canonicalization optimized away

2018-09-14 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188

--- Comment #26 from John David Anglin  ---
Author: danglin
Date: Fri Sep 14 23:30:32 2018
New Revision: 264337

URL: https://gcc.gnu.org/viewcvs?rev=264337&root=gcc&view=rev
Log:
PR middle-end/87188
* dojump.c (do_compare_and_jump): Canonicalize function pointers
when one operand is a function pointer.  Use POINTER_TYPE_P and
FUNC_OR_METHOD_TYPE_P.
* expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
* fold-const.c (build_range_check): Likewise.
* match.pd (simple_comparison): Likewise.


Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dojump.c
branches/gcc-8-branch/gcc/expr.c
branches/gcc-8-branch/gcc/fold-const.c
branches/gcc-8-branch/gcc/match.pd

[Bug middle-end/87188] Function pointer canonicalization optimized away

2018-09-14 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188

--- Comment #25 from John David Anglin  ---
Author: danglin
Date: Fri Sep 14 23:26:12 2018
New Revision: 264336

URL: https://gcc.gnu.org/viewcvs?rev=264336&root=gcc&view=rev
Log:
PR middle-end/87188
* dojump.c (do_compare_and_jump): Canonicalize function pointers
when one operand is a function pointer.  Use POINTER_TYPE_P and
FUNC_OR_METHOD_TYPE_P.
* expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
* fold-const.c (build_range_check): Likewise.
* match.pd (simple_comparison): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/dojump.c
trunk/gcc/expr.c
trunk/gcc/fold-const.c
trunk/gcc/match.pd