From 546eb36c7e0ba37974489280059ca14166f07c26 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 14 Mar 2017 13:05:29 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/multiple_target.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 458fadd..8015a15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 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 * multiple_target.c (expand_target_clones): Drop local.local flag for default implementation. diff --git a/gcc/multiple_target.c b/gcc/multiple_target.c index 4a835bb..427c655 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) -- 2.7.4