public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106632] New: undefined code causes assembler failure
@ 2022-08-15 22:56 pinskia at gcc dot gnu.org
  2022-08-15 22:57 ` [Bug target/106632] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-15 22:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106632

            Bug ID: 106632
           Summary: undefined code causes assembler failure
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: assemble-failure
          Severity: normal
          Priority: P3
         Component: target
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: riscv-linux-gnu

Take:
long f(long a, long  b)
{
  b = 66;
  return (a >> b) & 1;
}

This will produce:
f:
        bexti   a0,a0,66
        ret

Which is invalid assembly as rejected by gas:
/tmp/ccTvKnLv.s: Assembler messages:
/tmp/ccTvKnLv.s:8: Error: improper shift amount (66)

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

end of thread, other threads:[~2022-08-24 19:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 22:56 [Bug target/106632] New: undefined code causes assembler failure pinskia at gcc dot gnu.org
2022-08-15 22:57 ` [Bug target/106632] " pinskia at gcc dot gnu.org
2022-08-24 19:20 ` cvs-commit at gcc dot gnu.org
2022-08-24 19:21 ` pinskia at gcc dot gnu.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).