This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/25718] New: invalid assembly for unsigned-minimum expressions.
- From: "hp at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2006 05:36:19 -0000
- Subject: [Bug target/25718] New: invalid assembly for unsigned-minimum expressions.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For this code:
unsigned foo(unsigned a)
{
unsigned l;
l = (a >= (~0u - 512) ? (~0u - 512) : a);
return l;
}
At any optimization level, including -O0, -O1 and -O2, you get
(at varying lines, of course):
x.s: Assembler messages:
x.s:14: Error: Immediate value not in 8 bit range: -513
The offending asm is:
bound.b -513,$r9
where the -513 operand is clearly not in the range (signed+unsigned) -128..255.
I can trace this back to (a modified version of) gcc-3.2.
--
Summary: invalid assembly for unsigned-minimum expressions.
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: hp at gcc dot gnu dot org
ReportedBy: hp at gcc dot gnu dot org
GCC target triplet: cris-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25718