x86: Add a test for PR target/123210

PR target/123210 was fixed by

commit r16-7563-gb54533a28632482e91d7dfbbc47c75fb6d5e78bb
Author: H.J. Lu <hjl.tools@gmail.com>
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 <hjl.tools@gmail.com>
This commit is contained in:
H.J. Lu
2026-04-04 04:56:01 +08:00
parent 0ce6f1d493
commit 3fee7c00ce

View File

@@ -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;
}