{"id":2226695,"url":"http://patchwork.ozlabs.org/api/patches/2226695/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhuodmon6a.gcc.gcc-TEST.alfie.richards.49.1.4@forge-stage.sourceware.org/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<bmm.hhuodmon6a.gcc.gcc-TEST.alfie.richards.49.1.4@forge-stage.sourceware.org>","list_archive_url":null,"date":"2026-04-22T18:21:52","name":"[v1,04/13] fmv: Add check_target_clone hook for filtering target_clone versions.","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"7848bbcbf982ca4d7f47b2b60f37827baa90c3d4","submitter":{"id":93228,"url":"http://patchwork.ozlabs.org/api/people/93228/?format=json","name":"\\\"alfie.richards via Sourceware Forge\\\"","email":"forge-bot+alfie.richards@forge-stage.sourceware.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhuodmon6a.gcc.gcc-TEST.alfie.richards.49.1.4@forge-stage.sourceware.org/mbox/","series":[{"id":501072,"url":"http://patchwork.ozlabs.org/api/series/501072/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=501072","date":"2026-04-22T18:21:54","name":"FMV refactor and ACLE compliance for C++","version":1,"mbox":"http://patchwork.ozlabs.org/series/501072/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2226695/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2226695/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org","sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org","server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g17Dc0Tfqz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:34:40 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 3E0004309597\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:34:38 +0000 (GMT)","from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 8472E442FC39\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:23:30 +0000 (GMT)","from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 5A52E43457\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:23:30 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 3E0004309597","OpenDKIM Filter v2.11.0 sourceware.org 8472E442FC39"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 8472E442FC39","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 8472E442FC39","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776882210; cv=none;\n b=JTf4UbMhomW8zG0jzIf/z8LZ8GtBbAdc/ppmY5pbqregcyHy4ebOHoUAQFGa+RC1RoIFLmVU4sFpZrGztwCxaPp8EmPeE74RoAbAXu+2bPZQWWuxORzLrxG5BzmB5msJEMsnsBpiFZ4k8eOWfVVC1LvpE+3j4tD9ZJ3yjNeIUCU=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776882210; c=relaxed/simple;\n bh=Nk66jkxdK056RMgVYejpTA3WRc9GqMAGwer9d97tHDU=;\n h=From:Date:Subject:To:Message-ID;\n b=L99K3fyuWNiiCiqtebrtIiAu3tlY4IMaB3lXYgHN2qWOJefaZwvA4gEdPFE5hvWJjd4Stm+7AMqAMoTkhDSvVBLXCYrcStErYqehvabHyocs2CUH/VyvJ7lVlZjyWInthiwR8Ylw0xvm2ZyEGiMiqW19YdWBYiFDMaO9+yzicIg=","ARC-Authentication-Results":"i=1; server2.sourceware.org","From":"\"\\\"alfie.richards via Sourceware Forge\\\"\"\n <forge-bot+alfie.richards@forge-stage.sourceware.org>","Date":"Wed, 22 Apr 2026 18:21:52 +0000","Subject":"[PATCH v1 04/13] fmv: Add check_target_clone hook for filtering\n target_clone versions.","To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>","Message-ID":"\n <bmm.hhuodmon6a.gcc.gcc-TEST.alfie.richards.49.1.4@forge-stage.sourceware.org>","X-Mailer":"batrachomyomachia","X-Requested-Reviewer":["rsandifo","rearnsha"],"X-Pull-Request-Organization":"gcc","X-Pull-Request-Repository":"gcc-TEST","X-Pull-Request":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/49","References":"\n <bmm.hhuodmon6a.gcc.gcc-TEST.alfie.richards.49.1.0@forge-stage.sourceware.org>","In-Reply-To":"\n <bmm.hhuodmon6a.gcc.gcc-TEST.alfie.richards.49.1.0@forge-stage.sourceware.org>","X-Patch-URL":"\n https://forge.sourceware.org/alfie.richards/gcc-TEST/commit/9f16d0731d6827f918211a9540ebdd6e70fcd1a1","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Reply-To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>,\n alfierichards@sourceware.org","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"From: Alfie Richards <alfie.richards@arm.com>\n\nThis patch introduces the TARGET_CHECK_TARGET_CLONE_VERSION hook\nwhich is used to determine if a target_clones version string parses.\n\nThe hook has a flag to enable emitting diagnostics.\n\nThis is as specified in the Arm C Language Extension. The purpose of this\nis to be able to ignore invalid versions to allow some portability of code\nusing target_clones attributes.\n\nCurrently this is only properly implemented for the Aarch64 backend.\n\nFor riscv which is the only other backend which uses target_version\nsemantics a partial implementation is present, where this hook is used\nto check parsing, in which errors will be emitted on a failed parse\nrather than warnings. A refactor of the riscv parsing logic would be\nrequired to enable this functionality fully.\n\nThis fixes PR 118339 where parse failures could cause ICE in Aarch64.\n\ngcc/ChangeLog:\n\n\tPR target/118339\n\t* target.def: Add check_target_clone_version hook.\n\t* tree.cc (get_clone_attr_versions): Add filter argument.\n\t(get_clone_versions): Add filter argument.\n\t* tree.h (get_clone_attr_versions): Add filter.\n\t(get_clone_versions): Add filter argument.\n\t* config/aarch64/aarch64.cc (aarch64_check_target_clone_version):\n\tNew function\n\t(TARGET_CHECK_TARGET_CLONE_VERSION): New define.\n\t* config/riscv/riscv.cc (riscv_check_target_clone_version):\n\tNew function.\n\t(TARGET_CHECK_TARGET_CLONE_VERSION): New define.\n\t* doc/tm.texi: Regenerated.\n\t* doc/tm.texi.in: Add documentation for new hook.\n\t* hooks.h (hook_stringslice_locationtptr_true): New function.\n\t* hooks.cc (hook_stringslice_locationtptr_true): New function.\n\ngcc/c-family/ChangeLog:\n\n\t* c-attribs.cc (handle_target_clones_attribute): Update to use new hook.\n---\n gcc/c-family/c-attribs.cc     | 23 +++++++++++---\n gcc/config/aarch64/aarch64.cc | 57 +++++++++++++++++++++++++++++++++++\n gcc/config/riscv/riscv.cc     | 25 +++++++++++++++\n gcc/doc/tm.texi               |  9 ++++++\n gcc/doc/tm.texi.in            |  2 ++\n gcc/hooks.cc                  |  8 +++++\n gcc/hooks.h                   |  3 ++\n gcc/target.def                | 13 ++++++++\n gcc/tree.cc                   | 17 ++++++++---\n gcc/tree.h                    | 13 +++++---\n 10 files changed, 156 insertions(+), 14 deletions(-)","diff":"diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc\nindex 041a00479bd9..86d2b60c83a0 100644\n--- a/gcc/c-family/c-attribs.cc\n+++ b/gcc/c-family/c-attribs.cc\n@@ -6249,12 +6249,25 @@ handle_target_clones_attribute (tree *node, tree name, tree ARG_UNUSED (args),\n \t    }\n \t}\n \n-      auto_vec<string_slice> versions = get_clone_attr_versions (args, NULL);\n-\n-      if (versions.length () == 1)\n+      int num_defaults = 0;\n+      auto_vec<string_slice> versions = get_clone_attr_versions\n+\t\t\t\t\t  (args,\n+\t\t\t\t\t   &num_defaults,\n+\t\t\t\t\t   false);\n+\n+      for (auto v : versions)\n+\ttargetm.check_target_clone_version\n+\t  (v, &DECL_SOURCE_LOCATION (*node));\n+\n+      /* Lone target_clones version is always ignored for target attr semantics.\n+\t Only ignore under target_version semantics if it is a default\n+\t version.  */\n+      if (versions.length () == 1\n+\t  && (TARGET_HAS_FMV_TARGET_ATTRIBUTE || num_defaults == 1))\n \t{\n-\t  warning (OPT_Wattributes,\n-\t\t   \"single %<target_clones%> attribute is ignored\");\n+\t  if (TARGET_HAS_FMV_TARGET_ATTRIBUTE)\n+\t    warning (OPT_Wattributes,\n+\t\t     \"single %<target_clones%> attribute is ignored\");\n \t  *no_add_attrs = true;\n \t}\n       else\ndiff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc\nindex 78db3a436a7a..5415af2a73b6 100644\n--- a/gcc/config/aarch64/aarch64.cc\n+++ b/gcc/config/aarch64/aarch64.cc\n@@ -31886,6 +31886,60 @@ aarch64_expand_fp_spaceship (rtx dest, rtx op0, rtx op1, rtx hint)\n     }\n }\n \n+/* Checks if the function version string STR parses correctly.\n+   If it is an invalid string, returns true to reject the string, otherwise\n+   returns false.\n+   If loc is not NULL and the string is invalid, emits a warning.  */\n+\n+bool\n+aarch64_check_target_clone_version (string_slice str, location_t *loc)\n+{\n+  str = str.strip ();\n+\n+  if (str == \"default\")\n+    return true;\n+\n+  enum aarch_parse_opt_result parse_res;\n+  auto isa_flags = aarch64_asm_isa_flags;\n+  std::string invalid_extension;\n+\n+  parse_res\n+    = aarch64_parse_fmv_features (str, &isa_flags, NULL, &invalid_extension);\n+\n+  if (loc == NULL)\n+    return parse_res == AARCH_PARSE_OK;\n+\n+  switch (parse_res)\n+    {\n+    case AARCH_PARSE_OK:\n+      return true;\n+    case AARCH_PARSE_MISSING_ARG:\n+      warning_at (*loc, OPT_Wattributes,\n+\t\t  \"empty string not valid for a %<target_clones%> version\");\n+      break;\n+    case AARCH_PARSE_INVALID_FEATURE:\n+      warning_at (*loc, OPT_Wattributes,\n+\t\t  \"invalid feature modifier %qs in version %qB for \"\n+\t\t  \"%<target_clones%> attribute\",\n+\t\t  invalid_extension.c_str (), &str);\n+      break;\n+    case AARCH_PARSE_DUPLICATE_FEATURE:\n+      warning_at (*loc, OPT_Wattributes,\n+\t\t  \"duplicate feature modifier %qs in version %qB for \"\n+\t\t  \"%<target_clones%> attribute\",\n+\t\t  invalid_extension.c_str (), &str);\n+      break;\n+    case AARCH_PARSE_INVALID_ARG:\n+      warning_at (*loc, OPT_Wattributes,\n+\t\t  \"invalid feature %qs in version %qB for \"\n+\t\t  \"%<target_clones%> attribute\",\n+\t\t  invalid_extension.c_str (), &str);\n+      break;\n+    gcc_unreachable ();\n+    }\n+  return false;\n+}\n+\n /* Target-specific selftests.  */\n \n #if CHECKING_P\n@@ -32743,6 +32797,9 @@ aarch64_libgcc_floating_mode_supported_p\n #undef TARGET_OPTION_FUNCTION_VERSIONS\n #define TARGET_OPTION_FUNCTION_VERSIONS aarch64_common_function_versions\n \n+#undef TARGET_CHECK_TARGET_CLONE_VERSION\n+#define TARGET_CHECK_TARGET_CLONE_VERSION aarch64_check_target_clone_version\n+\n #undef TARGET_COMPARE_VERSION_PRIORITY\n #define TARGET_COMPARE_VERSION_PRIORITY aarch64_compare_version_priority\n \ndiff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc\nindex 6bbbe65b32f6..419eec7ed168 100644\n--- a/gcc/config/riscv/riscv.cc\n+++ b/gcc/config/riscv/riscv.cc\n@@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License\n along with GCC; see the file COPYING3.  If not see\n <http://www.gnu.org/licenses/>.  */\n \n+#include \"input.h\"\n #define IN_TARGET_CODE 1\n \n #define INCLUDE_STRING\n@@ -14065,6 +14066,27 @@ riscv_common_function_versions (tree fn1, tree fn2)\n   return riscv_compare_version_priority (fn1, fn2) != 0;\n }\n \n+/* Checks if the function version specifying string STR parses correctly.\n+   If it is an invalid string, currently emits a diagnostic at LOC.\n+   Always returns true.  */\n+\n+bool\n+riscv_check_target_clone_version (string_slice str, location_t *loc_p)\n+{\n+  struct riscv_feature_bits mask;\n+  int prio;\n+\n+  location_t loc = loc_p ? *loc_p : UNKNOWN_LOCATION;\n+\n+  /* Currently it is not possible to parse without emitting errors on failure\n+     so do not reject on a failed parse, as this would then emit two\n+     diagnostics.  Instead let errors be emitted which will halt\n+     compilation.  */\n+  parse_features_for_version (str, loc, mask, prio);\n+\n+  return true;\n+}\n+\n /* Implement TARGET_MANGLE_DECL_ASSEMBLER_NAME, to add function multiversioning\n    suffixes.  */\n \n@@ -15791,6 +15813,9 @@ synthesize_add (rtx operands[3])\n #undef TARGET_COMPARE_VERSION_PRIORITY\n #define TARGET_COMPARE_VERSION_PRIORITY riscv_compare_version_priority\n \n+#undef TARGET_CHECK_TARGET_CLONE_VERSION\n+#define TARGET_CHECK_TARGET_CLONE_VERSION riscv_check_target_clone_version\n+\n #undef TARGET_OPTION_FUNCTION_VERSIONS\n #define TARGET_OPTION_FUNCTION_VERSIONS riscv_common_function_versions\n \ndiff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi\nindex 4c338c382adc..b37708d9be98 100644\n--- a/gcc/doc/tm.texi\n+++ b/gcc/doc/tm.texi\n@@ -12289,6 +12289,15 @@ function version at run-time for a given set of function versions.\n body must be generated.\n @end deftypefn\n \n+@deftypefn {Target Hook} bool TARGET_CHECK_TARGET_CLONE_VERSION (string_slice @var{str}, location_t *@var{loc})\n+This hook is used to check if a version specified in a @code{target_clones}\n+annotation is valid. @var{str} is the version to be considered.\n+If @var{loc} is not @code{NULL} then emit warnings for invalid errors at\n+that location.\n+Returns @code{true} if @var{str} is a valid version string, and @code{false}\n+otherwise\n+@end deftypefn\n+\n @deftypefn {Target Hook} bool TARGET_PREDICT_DOLOOP_P (class loop *@var{loop})\n Return true if we can predict it is possible to use a low-overhead loop\n for a particular loop.  The parameter @var{loop} is a pointer to the loop.\ndiff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in\nindex 12b8ed660a08..c2e7921192cc 100644\n--- a/gcc/doc/tm.texi.in\n+++ b/gcc/doc/tm.texi.in\n@@ -7897,6 +7897,8 @@ to by @var{ce_info}.\n \n @hook TARGET_GENERATE_VERSION_DISPATCHER_BODY\n \n+@hook TARGET_CHECK_TARGET_CLONE_VERSION\n+\n @hook TARGET_PREDICT_DOLOOP_P\n \n @hook TARGET_HAVE_COUNT_REG_DECR_P\ndiff --git a/gcc/hooks.cc b/gcc/hooks.cc\nindex 76cb593103dd..865820d80b1d 100644\n--- a/gcc/hooks.cc\n+++ b/gcc/hooks.cc\n@@ -585,3 +585,11 @@ hook_optmode_mode_uhwi_none (machine_mode, unsigned HOST_WIDE_INT)\n {\n   return opt_machine_mode ();\n }\n+\n+/* Generic hook that takes a string_slice and a locations and returns false.  */\n+\n+bool\n+hook_stringslice_locationtptr_true (string_slice, location_t *)\n+{\n+  return true;\n+}\ndiff --git a/gcc/hooks.h b/gcc/hooks.h\nindex e95bd11aca86..08542d7a24eb 100644\n--- a/gcc/hooks.h\n+++ b/gcc/hooks.h\n@@ -137,4 +137,7 @@ extern const char *hook_constcharptr_int_const_tree_const_tree_null (int, const_\n \n extern opt_machine_mode hook_optmode_mode_uhwi_none (machine_mode,\n \t\t\t\t\t\t     unsigned HOST_WIDE_INT);\n+\n+extern bool hook_stringslice_locationtptr_true (string_slice, location_t *);\n+\n #endif\ndiff --git a/gcc/target.def b/gcc/target.def\nindex 5dd8f253ef6e..c4912622f671 100644\n--- a/gcc/target.def\n+++ b/gcc/target.def\n@@ -2606,6 +2606,19 @@ version at run-time. @var{decl} is one version from a set of semantically\\n\\\n identical versions.\",\n  tree, (void *decl), NULL)\n \n+/* Target hook is used to ignore certain versions specified in a target_clones\n+   annoration.  STR is the version to be considered.  */\n+DEFHOOK\n+(check_target_clone_version ,\n+ \"This hook is used to check if a version specified in a @code{target_clones}\\n\\\n+annotation is valid. @var{str} is the version to be considered.\\n\\\n+If @var{loc} is not @code{NULL} then emit warnings for invalid errors at\\n\\\n+that location.\\n\\\n+Returns @code{true} if @var{str} is a valid version string, and @code{false}\\n\\\n+otherwise\",\n+ bool, (string_slice str, location_t *loc),\n+ hook_stringslice_locationtptr_true)\n+\n /* Returns a code for a target-specific builtin that implements\n    reciprocal of a target-specific function, or NULL_TREE if not available.  */\n DEFHOOK\ndiff --git a/gcc/tree.cc b/gcc/tree.cc\nindex ad3810918207..4e1d522827ef 100644\n--- a/gcc/tree.cc\n+++ b/gcc/tree.cc\n@@ -15398,10 +15398,13 @@ get_attr_nonstring_decl (tree expr, tree *ref)\n }\n \n /* Returns an auto_vec of string_slices containing the version strings from\n-   ARGLIST.  DEFAULT_COUNT is incremented for each default version found.  */\n+   ARGLIST.  DEFAULT_COUNT is incremented for each default version found.\n+   If FILTER is true then any invalid versions strings are not included.  */\n \n auto_vec<string_slice>\n-get_clone_attr_versions (const tree arglist, int *default_count)\n+get_clone_attr_versions (const tree arglist,\n+\t\t\t int *default_count,\n+\t\t\t bool filter)\n {\n   gcc_assert (TREE_CODE (arglist) == TREE_LIST);\n   auto_vec<string_slice> versions;\n@@ -15417,6 +15420,9 @@ get_clone_attr_versions (const tree arglist, int *default_count)\n \t  string_slice attr = string_slice::tokenize (&str, separators);\n \t  attr = attr.strip ();\n \n+\t  if (filter && !targetm.check_target_clone_version (attr, NULL))\n+\t    continue;\n+\n \t  if (attr == \"default\" && default_count)\n \t    (*default_count)++;\n \t  versions.safe_push (attr);\n@@ -15427,15 +15433,16 @@ get_clone_attr_versions (const tree arglist, int *default_count)\n \n /* Returns an auto_vec of string_slices containing the version strings from\n    the target_clone attribute from DECL.  DEFAULT_COUNT is incremented for each\n-   default version found.  */\n+   default version found.  If FILTER is true then any invalid versions strings\n+   are not included.  */\n auto_vec<string_slice>\n-get_clone_versions (const tree decl, int *default_count)\n+get_clone_versions (const tree decl, int *default_count, bool filter)\n {\n   tree attr = lookup_attribute (\"target_clones\", DECL_ATTRIBUTES (decl));\n   if (!attr)\n     return auto_vec<string_slice> ();\n   tree arglist = TREE_VALUE (attr);\n-  return get_clone_attr_versions (arglist, default_count);\n+  return get_clone_attr_versions (arglist, default_count, filter);\n }\n \n /* If DECL has a target_version attribute, returns a string_slice containing the\ndiff --git a/gcc/tree.h b/gcc/tree.h\nindex b67331aef743..f773ea1fef1b 100644\n--- a/gcc/tree.h\n+++ b/gcc/tree.h\n@@ -7101,10 +7101,15 @@ extern tree get_attr_nonstring_decl (tree, tree * = NULL);\n    Returns an invalid string_slice if no attribute is present.  */\n extern string_slice get_target_version (const tree);\n /* Returns a vector of the version strings from a target_clones attribute on\n-   a decl.  Can also record the number of default versions found.  */\n-extern auto_vec<string_slice> get_clone_versions (const tree, int * = NULL);\n+   a decl.  Can also record the number of default versions found.\n+   Use bool to control whether or not the results should\n+   be filtered with TARGET_CHECK_TARGET_CLONE_VERSION.  */\n+extern auto_vec<string_slice> get_clone_versions\n+  (const tree,int * = NULL, bool = true);\n /* Returns a vector of the version strings from a target_clones attribute\n-   directly.  */\n-extern auto_vec<string_slice> get_clone_attr_versions (const tree, int *);\n+   directly.  Additionally takes a bool to control whether or not the results\n+   should be filtered with TARGET_CHECK_TARGET_CLONE_VERSION.  */\n+extern auto_vec<string_slice> get_clone_attr_versions\n+  (const tree, int *, bool = true);\n \n #endif  /* GCC_TREE_H  */\n","prefixes":["v1","04/13"]}