]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Verify that target can create a dispatcher call (PR target/79892).
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Mar 2017 12:05:29 +0000 (12:05 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246120 138bc75d-0d04-0410-961f-82ee72b054a4

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)