Fix handling of fnspec for internal functions.
authorJan Hubicka <jh@suse.cz>
Thu, 1 Oct 2020 12:57:36 +0000 (14:57 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 1 Oct 2020 12:57:36 +0000 (14:57 +0200)
* internal-fn.c (DEF_INTERNAL_FN): Fix handling of fnspec

gcc/internal-fn.c

index 8ea3195d31ce6b6f25430445f2679fe071773af2..c89708200267afa2398d3dc23c10025b14efd68a 100644 (file)
@@ -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;
 }