This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/20134] [4.0 Regression] combine messes up subreg/zero_extend/compare/lshift
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2005 17:03:31 -0000
- Subject: [Bug rtl-optimization/20134] [4.0 Regression] combine messes up subreg/zero_extend/compare/lshift
- References: <20050222001243.20134.janis@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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