From: Roger Sayle Date: Sun, 16 Apr 2023 12:03:10 +0000 (+0100) Subject: [Committed] New test case gcc.target/avr/pr54816.c X-Git-Tag: basepoints/gcc-14~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f006d1a5a1e136be29c78b96c8742ebd3710f4d0;p=thirdparty%2Fgcc.git [Committed] New test case gcc.target/avr/pr54816.c 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 gcc/testsuite/ChangeLog PR target/54816 * gcc.target/avr/pr54816.c: New test case. --- diff --git a/gcc/testsuite/gcc.target/avr/pr54816.c b/gcc/testsuite/gcc.target/avr/pr54816.c new file mode 100644 index 000000000000..56be78040ce1 --- /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 } } */