From: Martin Liska Date: Tue, 14 Mar 2017 12:05:29 +0000 (+0100) Subject: Verify that target can create a dispatcher call (PR target/79892). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=546eb36c7e0ba37974489280059ca14166f07c26;p=gcc.git Verify that target can create a dispatcher call (PR target/79892). 2017-03-14 Martin Liska PR target/79892 * multiple_target.c (create_dispatcher_calls): Check that a target can create a function dispatcher. From-SVN: r246120 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 458faddc8ae..8015a15169c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-14 Martin Liska + + PR target/79892 + * multiple_target.c (create_dispatcher_calls): Check that + a target can create a function dispatcher. + 2017-03-14 Martin Liska PR lto/66295 diff --git a/gcc/multiple_target.c b/gcc/multiple_target.c index 4a835bbcc17..427c655c8ae 100644 --- a/gcc/multiple_target.c +++ b/gcc/multiple_target.c @@ -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)