Re: [RS6000] Do not define builtins that overload disabled builtins

2020-10-28 Thread David Edelsohn via Gcc-patches
On Wed, Oct 28, 2020 at 6:46 AM Alan Modra  wrote:
>
> commit 25ffd3d34e means we no longer define an overloaded
> __builtin_byte_in_set for -m32, so the more informative
> "__builtin_byte_in_set is not supported in this compiler
> configuration" is not reported.
>
> Regression tested powerpc64-linux biarch.  OK?
>
> PR bootstrap/92661
> * gcc.target/powerpc/byte-in-set-2.c: Update expected error.
>
> diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c 
> b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
> index 9a80c27fe26..34ab50e25ba 100644
> --- a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
> +++ b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
> @@ -11,5 +11,5 @@
>  int
>  test_byte_in_set (unsigned char b, unsigned long long set_members)
>  {
> -  return __builtin_byte_in_set (b, set_members); /* { dg-error 
> "'__builtin_byte_in_set' is not supported in this compiler configuration" } */
> +  return __builtin_byte_in_set (b, set_members); /* { dg-warning "implicit 
> declaration of function" } */
>  }

Thanks for tracking this down and generating the fix.  The problems
were more extensive than this one error message.  All of the
byte-in-*.c testcases had incorrect target requirements.

I updated the testcases and changed the expected result for byte-in-2.c.

I committed the patch.

Thanks, David


Re: [RS6000] Do not define builtins that overload disabled builtins

2020-10-28 Thread Alan Modra via Gcc-patches
commit 25ffd3d34e means we no longer define an overloaded
__builtin_byte_in_set for -m32, so the more informative
"__builtin_byte_in_set is not supported in this compiler
configuration" is not reported.

Regression tested powerpc64-linux biarch.  OK?

PR bootstrap/92661
* gcc.target/powerpc/byte-in-set-2.c: Update expected error.

diff --git a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c 
b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
index 9a80c27fe26..34ab50e25ba 100644
--- a/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/byte-in-set-2.c
@@ -11,5 +11,5 @@
 int
 test_byte_in_set (unsigned char b, unsigned long long set_members)
 {
-  return __builtin_byte_in_set (b, set_members); /* { dg-error 
"'__builtin_byte_in_set' is not supported in this compiler configuration" } */
+  return __builtin_byte_in_set (b, set_members); /* { dg-warning "implicit 
declaration of function" } */
 }

-- 
Alan Modra
Australia Development Lab, IBM