Verify that target can create a dispatcher call (PR target/79892).
authorMartin Liska <mliska@suse.cz>
Tue, 14 Mar 2017 12:05:29 +0000 (13:05 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 14 Mar 2017 12:05:29 +0000 (12:05 +0000)
2017-03-14  Martin Liska  <mliska@suse.cz>

PR target/79892
* multiple_target.c (create_dispatcher_calls): Check that
a target can create a function dispatcher.

From-SVN: r246120

gcc/ChangeLog
gcc/multiple_target.c

index 458faddc8aed30e0e8d653d5a75105d7b5448019..8015a15169c50a248e1df417570d3f725d31f132 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-14  Martin Liska  <mliska@suse.cz>
+
+       PR target/79892
+       * multiple_target.c (create_dispatcher_calls): Check that
+       a target can create a function dispatcher.
+
 2017-03-14  Martin Liska  <mliska@suse.cz>
 
        PR lto/66295
index 4a835bbcc176714af6f30bcc3387b5058662a86f..427c655c8aeaae2a7c4afc11a57bc9162d343235 100644 (file)
@@ -68,6 +68,13 @@ create_dispatcher_calls (struct cgraph_node *node)
                    " supported by this target");
          break;
        }
+      else if (!targetm.get_function_versions_dispatcher)
+       {
+         error_at (gimple_location (call),
+                   "target does not support function version dispatcher");
+         break;
+       }
+
       e_next = e->next_caller;
       idecl = targetm.get_function_versions_dispatcher (decl);
       if (!idecl)