From: "Roger Sayle" <roger@nextmovesoftware.com>
To: "'GCC Patches'" <gcc-patches@gcc.gnu.org>
Subject: [Committed] New test case gcc.target/avr/pr54816.c
Date: Sun, 16 Apr 2023 13:07:34 +0100 [thread overview]
Message-ID: <00c701d9705c$083f5250$18bdf6f0$@nextmovesoftware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
PR target/54816 is now fixed on mainline. This adds a test case to
check that it doesn't regress in future. Tested with a cross compiler
to avr-elf. Committed as obvious.
2023-04-16 Roger Sayle <roger@nextmovesoftware.com>
gcc/testsuite/ChangeLog
PR target/54816
* gcc.target/avr/pr54816.c: New test case.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 469 bytes --]
diff --git a/gcc/testsuite/gcc.target/avr/pr54816.c b/gcc/testsuite/gcc.target/avr/pr54816.c
new file mode 100644
index 0000000..56be780
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/pr54816.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -mmcu=atmega8" } */
+int wmul (char a, char b)
+{
+ return a * (char) (b << 3);
+}
+
+/* { dg-final { scan-assembler-times "lsl" 3 } } */
+/* { dg-final { scan-assembler-times "muls" 1 } } */
reply other threads:[~2023-04-16 12:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00c701d9705c$083f5250$18bdf6f0$@nextmovesoftware.com' \
--to=roger@nextmovesoftware.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).