This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regression/49572] [4.4 Regression]: gcc.dg/tree-ssa/20030709-2.c scan-tree-dump-times cddce2 ".rtmem" 0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49572

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-29 21:14:55 UTC ---
> ISTM that DOM considering those two accesses equivalent, even though they had
> different types is arguably incorrect behaviour.

The accesses themselves have the same type, since they are strictly identical.
The problem is the type of the LHS, which is incompatible between the 2 cases.

> I have vague memories that we played things a little fast and loose with types
> of memory loads.  ie, if the destination had type T1, but the field reference
> had type T2 and we knew that T1 and T2 were the same size, then we'd change the
> type of the field reference to T1 and avoid the typecast from T2 to T1.  IIRC
> we did this in the gimplifier.

After tuplification, DOM records the type of the LHS of assignment statements
as the type of the expression.  And then it tests the compatibility of these
types.
This is problematic because you can have non-compatible types on the LHS and
RHS of assignment statements, if the conversion RHS->LHS is deemed useless,
e.g. for pointers.  See types_compatible_p and useless_type_conversion_p in
tree-ssa.c.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]