public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25718]  New: invalid assembly for unsigned-minimum expressions.
@ 2006-01-09  5:36 hp at gcc dot gnu dot org
  2006-01-09  5:36 ` [Bug target/25718] " hp at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2006-01-09  5:36 UTC (permalink / raw)
  To: gcc-bugs

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-01-28 23:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-09  5:36 [Bug target/25718] New: invalid assembly for unsigned-minimum expressions hp at gcc dot gnu dot org
2006-01-09  5:36 ` [Bug target/25718] " hp at gcc dot gnu dot org
2006-01-09  5:43 ` hp at gcc dot gnu dot org
2006-01-09  5:43 ` hp at gcc dot gnu dot org
2006-01-10 18:12 ` hp at gcc dot gnu dot org
2006-01-10 18:13 ` hp at gcc dot gnu dot org
2006-01-10 18:14 ` hp at gcc dot gnu dot org
2006-01-10 19:01 ` hp at gcc dot gnu dot org
2006-01-28 23:00 ` hp at gcc dot gnu dot org
2006-01-28 23:01 ` hp at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).