[Bug c++/37016] [4.3/4.4 Regression] member function pointer failure with optimization
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 4 20:29:00 GMT 2008
------- Comment #10 from rguenth at gcc dot gnu dot org 2008-08-04 20:27 -------
The middle-end expects that if there is variable of record type T that for
a component-reference it can walk its fields and find the one used as
operand 1 in the component-reference.
If you look at the tree in commend #4 as it reaches the middle-end then
this is not the case. SRA tries to deal with this by doing
case FIELD_DECL:
/* Fields are unique within a record, but not between
compatible records. */
if (DECL_FIELD_CONTEXT (ae) == DECL_FIELD_CONTEXT (be))
return false;
return fields_compatible_p (ae, be);
but fields_compatible_p returns false because
if (!types_compatible_p (TREE_TYPE (f1), TREE_TYPE (f2)))
return false;
returns false.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37016
More information about the Gcc-bugs
mailing list