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 458fadd..8015a15 100644 (file)
@@ -1,5 +1,11 @@
 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
        * multiple_target.c (expand_target_clones): Drop local.local
        flag for default implementation.
index 4a835bb..427c655 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)