This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37016] [4.3/4.4 Regression] member function pointer failure with optimization
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2008 21:03:50 -0000
- Subject: [Bug c++/37016] [4.3/4.4 Regression] member function pointer failure with optimization
- References: <bug-37016-16558@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from jason at gcc dot gnu dot org 2008-08-04 21:03 -------
Well, that's the problem then: we have two POINTER_TYPE to METHOD_TYPE which
are considered equivalent in the front end, but not equivalent in the tree-ssa
types_compatible_p.
The specific bug seems to be that useless_type_conversion_1 doesn't expect to
need to do structural comparison of non-aggregate types. That's an invalid
assumption; it should check TYPE_STRUCTURAL_EQUALITY_P. Does the attached
patch seem appropriate to you? It fixes the bug for me, though I haven't
regression tested it.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-08-04 09:18:24 |2008-08-04 21:03:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37016