aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-10-12 05:22:52 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-10-12 16:58:45 +0800
commit80d0e10847ec64799deb53061fb50876043116fe (patch)
treed3855c2cd961849bbc5d58f7843f46971e964d78
parenta4ce8681929c597639ce382b2a0414e27c46725c (diff)
downloadgcc-80d0e10847ec64799deb53061fb50876043116fe.zip
gcc-80d0e10847ec64799deb53061fb50876043116fe.tar.gz
gcc-80d0e10847ec64799deb53061fb50876043116fe.tar.bz2
gcc.target/i386/pr115749.c: Use word_mode integer
Use word_mode integer with func so that 64-bit integer is used with x32. * gcc.target/i386/pr115749.c (uword): New. (func): Replace unsigned long with uword. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r--gcc/testsuite/gcc.target/i386/pr115749.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr115749.c b/gcc/testsuite/gcc.target/i386/pr115749.c
index 82505d6..e7946d7 100644
--- a/gcc/testsuite/gcc.target/i386/pr115749.c
+++ b/gcc/testsuite/gcc.target/i386/pr115749.c
@@ -4,7 +4,9 @@
/* { dg-final { scan-assembler-times "imul" 2 } } */
/* { dg-final { scan-assembler-not "sal" } } */
-unsigned long func(unsigned long x)
+typedef unsigned int uword __attribute__ ((mode (word)));
+
+uword func(uword x)
{
return x % 240;
}