From: John David Anglin Date: Sun, 21 Jan 2018 18:15:31 +0000 (+0000) Subject: re PR testsuite/77734 (FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_ca... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e55b72cfb384105c6be87051c1182c05c481cd87;p=gcc.git re PR testsuite/77734 (FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so (test for excess errors)) PR gcc/77734 * config/pa/pa.c (pa_function_ok_for_sibcall): Use targetm.binds_local_p instead of TREE_PUBLIC to check local binding. Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check. From-SVN: r256934 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d56c473e68..0308f35d10f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-01-21 John David Anglin + + PR gcc/77734 + * config/pa/pa.c (pa_function_ok_for_sibcall): Use + targetm.binds_local_p instead of TREE_PUBLIC to check local binding. + Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check. + 2018-01-21 Bill Schmidt David Edelsohn diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 809cc6566c2..0809a79cd50 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -8655,9 +8655,6 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta, static bool pa_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) { - if (TARGET_PORTABLE_RUNTIME) - return false; - /* Sibcalls are not ok because the arg pointer register is not a fixed register. This prevents the sibcall optimization from occurring. In addition, there are problems with stub placement using GNU ld. This @@ -8667,8 +8664,11 @@ pa_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) if (TARGET_64BIT) return false; + if (TARGET_PORTABLE_RUNTIME) + return false; + /* Sibcalls are only ok within a translation unit. */ - return (decl && !TREE_PUBLIC (decl)); + return decl && targetm.binds_local_p (decl); } /* ??? Addition is not commutative on the PA due to the weird implicit