From 3fee7c00ce4334ad612281e4bd5b0d7133e8b676 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 4 Apr 2026 04:56:01 +0800 Subject: [PATCH] x86: Add a test for PR target/123210 PR target/123210 was fixed by commit r16-7563-gb54533a28632482e91d7dfbbc47c75fb6d5e78bb Author: H.J. Lu Date: Tue Feb 17 09:51:58 2026 +0800 x86: Update stack alignment only if stack is used Add a test to verify the fix. PR target/123210 * gcc.target/i386/pr123210.c: New test. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.target/i386/pr123210.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr123210.c diff --git a/gcc/testsuite/gcc.target/i386/pr123210.c b/gcc/testsuite/gcc.target/i386/pr123210.c new file mode 100644 index 00000000000..ad66cc09781 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr123210.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target { int128 && lp64 } } } */ +/* { dg-require-effective-target pie } */ +/* { dg-options "-Os -fno-omit-frame-pointer -fPIE -fcondition-coverage -fstrub=all -mcmodel=large" } */ + +int a, b, c, d, e; + +void +foo () +{ + c = (__uint128_t) b >> 4; + if (__builtin_expect (e, 1)) + if (c) + d -= a; +}