rs6000: Mirror fix for PR102347 in new builtins support
authorBill Schmidt <wschmidt@linux.ibm.com>
Wed, 1 Dec 2021 15:20:15 +0000 (09:20 -0600)
committerBill Schmidt <wschmidt@linux.ibm.com>
Wed, 1 Dec 2021 18:17:22 +0000 (12:17 -0600)
commitd683a1b3e89007211a7c800bb61647d8ac42cb6b
treec4b9fcaa64487ec7441624b3884c08015d8631ce
parent54ebec35abec09a24b47b997172622ca0d8e2318
rs6000: Mirror fix for PR102347 in new builtins support

Recently Kewen fixed a problem in the old builtins support where
rs6000_builtin_decl prematurely indicated that a target builtin is
unavailable.  This also needs to be done for the new builtins support, but in
this case we have to ensure the error message is still produced from the
overload support in rs6000-c.c.  Unfortunately, this is less straightforward
than it could be, because header file includes need to be adjusted to make this
happen.  Someday we'll consolidate all the builtin code in one file and this
won't have to be so ugly.

2021-12-01  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
PR target/102347
* config/rs6000/rs6000-c.c (rs6000-builtins.h): Stop including.
(rs6000-internal.h): Include.
(altivec_resolve_new_overloaded_builtin): Move call to
rs6000_invalid_new_builtin here from rs6000_new_builtin_decl.
* config/rs6000/rs6000-call.c (rs6000-builtins.h): Stop including.
(rs6000_invalid_new_builtin): Remove static qualifier.
(rs6000_new_builtin_decl): Remove test for supported builtin.
* config/rs6000/rs6000-internal.h (rs6000-builtins.h): Include.
(rs6000_invalid_new_builtin): Declare.
* config/rs6000/rs6000.c (rs6000-builtins.h): Don't include.
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000-internal.h
gcc/config/rs6000/rs6000.c