diff mbox series

pr103194-5.c: Replace long with int64_t

Message ID 20211125041827.34620-1-hjl.tools@gmail.com
State New
Headers show
Series pr103194-5.c: Replace long with int64_t | expand

Commit Message

H.J. Lu Nov. 25, 2021, 4:18 a.m. UTC
Replace long with int64_t to work with -mx32.

	* gcc.target/i386/pr103194-5.c: Replace long with int64_t.
---
 gcc/testsuite/gcc.target/i386/pr103194-5.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Hongtao Liu Nov. 25, 2021, 5:35 a.m. UTC | #1
On Thu, Nov 25, 2021 at 12:18 PM H.J. Lu via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Replace long with int64_t to work with -mx32.
Thanks.
>
>         * gcc.target/i386/pr103194-5.c: Replace long with int64_t.
> ---
>  gcc/testsuite/gcc.target/i386/pr103194-5.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/pr103194-5.c b/gcc/testsuite/gcc.target/i386/pr103194-5.c
> index dfaddf0aa6e..2e335285c2f 100644
> --- a/gcc/testsuite/gcc.target/i386/pr103194-5.c
> +++ b/gcc/testsuite/gcc.target/i386/pr103194-5.c
> @@ -2,6 +2,7 @@
>  /* { dg-options "-O2" } */
>  #include <stdatomic.h>
>  #include <stdbool.h>
> +#include <stdint.h>
>
>  #define FOO(RTYPE,TYPE)                                                        \
>    __attribute__((noinline,noclone)) RTYPE                              \
> @@ -53,7 +54,7 @@
>      return __sync_fetch_and_and (a, ~mask) & mask;                     \
>    }                                                                    \
>
> -FOO(int, long);
> +FOO(int, int64_t);
>
>  /* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 2 } } */
>  /* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 4 } } */
> --
> 2.33.1
>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr103194-5.c b/gcc/testsuite/gcc.target/i386/pr103194-5.c
index dfaddf0aa6e..2e335285c2f 100644
--- a/gcc/testsuite/gcc.target/i386/pr103194-5.c
+++ b/gcc/testsuite/gcc.target/i386/pr103194-5.c
@@ -2,6 +2,7 @@ 
 /* { dg-options "-O2" } */
 #include <stdatomic.h>
 #include <stdbool.h>
+#include <stdint.h>
 
 #define FOO(RTYPE,TYPE)							\
   __attribute__((noinline,noclone)) RTYPE				\
@@ -53,7 +54,7 @@ 
     return __sync_fetch_and_and (a, ~mask) & mask;			\
   }									\
 
-FOO(int, long);
+FOO(int, int64_t);
 
 /* { dg-final { scan-assembler-times "lock;?\[ \t\]*bts" 2 } } */
 /* { dg-final { scan-assembler-times "lock;?\[ \t\]*btc" 4 } } */