[gcc r17-2381] x86: Add more tests for PR target/110533

"H.J. Lu via Gcc-cvs" <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:aefb5d25426494c8aba4b57b5d3b0655622a336d

commit r17-2381-gaefb5d25426494c8aba4b57b5d3b0655622a336d
Author: H.J. Lu <[email protected]>
Date:   Tue Jul 14 05:06:33 2026 +0800

    x86: Add more tests for PR target/110533
    
            PR target/110533
            * gcc.target/i386/pr110533-2a.c: New test.
            * gcc.target/i386/pr110533-2b.c: Likewise.
    
    Signed-off-by: H.J. Lu <[email protected]>

Diff:
---
 gcc/testsuite/gcc.target/i386/pr110533-2a.c | 14 ++++++++++++++
 gcc/testsuite/gcc.target/i386/pr110533-2b.c |  6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/gcc/testsuite/gcc.target/i386/pr110533-2a.c b/gcc/testsuite/gcc.target/i386/pr110533-2a.c
new file mode 100644
index 000000000000..fd6fe7930e38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr110533-2a.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+struct X {
+  int l1;
+  long long l2;
+};
+
+__attribute__((naked))
+void fn(struct X a) {
+    asm("ret");
+}
+
+/* { dg-final { scan-assembler-not "mov" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr110533-2b.c b/gcc/testsuite/gcc.target/i386/pr110533-2b.c
new file mode 100644
index 000000000000..782a50c6804e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr110533-2b.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+#include "pr110533-2a.c"
+
+/* { dg-final { scan-assembler-not "mov" } } */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.