Jonathan Yong via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Attached patch OK?
>
>      gcc.dg/memchr-3.c: fix for LLP64
>
>              gcc/testsuite/ChangeLog:
>
>              PR middle-end/97956
>              * gcc.dg/memchr-3.c (memchr): fix long to size_t in
>              prototype.
>
> From 194eb3d43964276beeaea14ebee4b241799cd966 Mon Sep 17 00:00:00 2001
> From: Jonathan Yong <10wa...@gmail.com>
> Date: Mon, 27 Feb 2023 10:02:32 +0000
> Subject: [PATCH] gcc.dg/memchr-3.c: fix for LLP64
>
>       gcc/testsuite/ChangeLog:
>
>       PR middle-end/97956
>       * gcc.dg/memchr-3.c (memchr): fix long to size_t in
>       prototype.

It looks like the current type signature could have been a deliberate
part of the test.  I think we should just skip it for LLP64 instead.
Preapproved if you agree.

Thanks,
Richard

>
> Signed-off-by: Jonathan Yong <10wa...@gmail.com>
> ---
>  gcc/testsuite/gcc.dg/memchr-3.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/memchr-3.c b/gcc/testsuite/gcc.dg/memchr-3.c
> index c38d9cf3349..c1f4e9e10dc 100644
> --- a/gcc/testsuite/gcc.dg/memchr-3.c
> +++ b/gcc/testsuite/gcc.dg/memchr-3.c
> @@ -5,8 +5,9 @@
>  
>  typedef __INT8_TYPE__  int8_t;
>  typedef __INT32_TYPE__ int32_t;
> +typedef __SIZE_TYPE__  size_t;
>  
> -extern void* memchr (const void*, int, long);
> +extern void* memchr (const void*, int, size_t);
>  
>  struct SX
>  {

Reply via email to