[Bug rtl-optimization/20134] [4.0 Regression] combine messes up subreg/zero_extend/compare/lshift

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 22 22:06:00 GMT 2005


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-22 17:03 -------
That's not a problem.  The SUBREG is SUBREG_PROMOTED_VAR_P and
SUBREG_PROMOTED_UNSIGNED_P, which is a promise that the upper 32 bits are all 0.

The problem is that when using the K&R style function definition, there is
no prototype for the function and so the caller expects
int exact_log2_wide (int);
while the callee is actually int exact_log2_wide (unsigned int);
It looks like int is passed sign extended and unsigned int zero extended,
so the functions disagree about what the upper 32 bits of the argument
should contain.

-- 


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



More information about the Gcc-bugs mailing list