Fix internal fnspec
Richard Biener
rguenther@suse.de
Tue Sep 29 15:11:14 GMT 2020
On September 29, 2020 4:17:30 PM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
>Hi,
>this patch fixes accidental \000 in fnspec strings for internal fns.
>OK?
OK.
Richard.
>Honza
>
> * internal-fn.c (DEF_INTERNAL_FN): Fix call of build_string.
>diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
>index 8ea3195d31c..c8970820026 100644
>--- a/gcc/internal-fn.c
>+++ b/gcc/internal-fn.c
>@@ -93,7 +93,7 @@ init_internal_fns ()
> {
> #define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) \
> if (FNSPEC) internal_fn_fnspec_array[IFN_##CODE] = \
>- build_string ((int) sizeof (FNSPEC), FNSPEC ? FNSPEC : "");
>+ build_string ((int) sizeof (FNSPEC) - 1, FNSPEC ? FNSPEC : "");
> #include "internal-fn.def"
> internal_fn_fnspec_array[IFN_LAST] = 0;
> }
More information about the Gcc-patches
mailing list