[Bug middle-end/18008] [4.0 Regression] Duplicate mask on bitfield insertion

roger at eyesopen dot com gcc-bugzilla@gcc.gnu.org
Sun Oct 17 19:02:00 GMT 2004


------- Additional Comments From roger at eyesopen dot com  2004-10-17 19:02 -------
There are clearly a number of problems exposed by this PR (constant folding
issues, x86 backend issues, RTL simplification issues, etc...)  My personal
pick of which is the worst of these is that get_inner_reference returns an
SImode "inner" reference in a call to expand_assignment with a QImode source
and a QImode target.  This is enough to confuse the RTL optimizers and backends
which aren't used to this type of unexpected mode change.

For example, changing "unsigned" to "unsigned char" in the testcase generates
significantly better code.  If get_inner_reference returned a QImode "tem",
then the optimizers wouldn't have problems combining the QImode AND with the
SImode AND.  Funny that we read this field as QImode, and write it as SImode!

get_inner_reference is called with:
component_ref:QImode (indirect_ref:SImode (parm_decl:SImode)) (field_decl:SImode))
and returns the indirect_ref:SImode.  This doesn't seem correct??


-- 


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



More information about the Gcc-bugs mailing list