[Bug bootstrap/92661] [10 Regression] AIX bootstrap failure with builtin-types.def change
bergner at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 25 19:42:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92661
--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to joseph@codesourcery.com from comment #4)
> My suggestion for the target-specific built-in functions would be:
>
> * builtin_function_type in rs6000-call.c should detect the case of a
> DECIMAL_FLOAT_MODE_P mode and NULL_TREE ret_type and return NULL_TREE in
> place of the existing error in that case.
>
> * rs6000_common_init_builtins should then accept a NULL_TREE type as
> indicating not to call def_builtin (or def_builtin could accept it as
> indicating to return early).
The following implements that idea, although, we have to test the arguments for
similar issues as the return type. It fixes my powerpc64le-linux
--disable-decimal-float build.
David, can you test this on AIX?
Index: gcc/config/rs6000/rs6000-call.c
===================================================================
--- gcc/config/rs6000/rs6000-call.c (revision 278692)
+++ gcc/config/rs6000/rs6000-call.c (working copy)
@@ -2935,6 +2935,10 @@ def_builtin (const char *name, tree type
unsigned classify = rs6000_builtin_info[(int)code].attr;
const char *attr_string = "";
+ /* Don't define the builtin if it doesn't have a type. See PR92661. */
+ if (type == NULL_TREE)
+ return;
+
gcc_assert (name != NULL);
gcc_assert (IN_RANGE ((int)code, 0, (int)RS6000_BUILTIN_COUNT));
@@ -7702,6 +7706,11 @@ builtin_function_type (machine_mode mode
if (!ret_type && h.uns_p[0])
ret_type = builtin_mode_to_type[h.mode[0]][0];
+ /* If the required decimal float type has been disabled, then return
+ without an error. */
+ if (!ret_type && DECIMAL_FLOAT_MODE_P (h.mode[0]))
+ return NULL_TREE;
+
if (!ret_type)
fatal_error (input_location,
"internal error: builtin function %qs had an unexpected "
@@ -7719,6 +7728,11 @@ builtin_function_type (machine_mode mode
if (!arg_type[i] && uns_p)
arg_type[i] = builtin_mode_to_type[m][0];
+ /* If the required decimal float type has been disabled, then return
+ without an error. */
+ if (!arg_type[i] && DECIMAL_FLOAT_MODE_P (m))
+ return NULL_TREE;
+
if (!arg_type[i])
fatal_error (input_location,
"internal error: builtin function %qs, argument %d "
More information about the Gcc-bugs
mailing list