diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2018-01-21 18:15:31 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2018-01-21 18:15:31 +0000 |
commit | e55b72cfb384105c6be87051c1182c05c481cd87 (patch) | |
tree | 68a148cd9e59b771020eba7f923cfcdd2870016a /gcc | |
parent | 07baf4a541d710bc5f1713cb168650ce5c210304 (diff) | |
download | gcc-e55b72cfb384105c6be87051c1182c05c481cd87.zip gcc-e55b72cfb384105c6be87051c1182c05c481cd87.tar.gz gcc-e55b72cfb384105c6be87051c1182c05c481cd87.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d56c473..0308f35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-01-21 John David Anglin <danglin@gcc.gnu.org> + + 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 <wschmidt@linux.vnet.ibm.com> David Edelsohn <dje.gcc@gmail.com> diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 809cc65..0809a79 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 |