diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2015-05-11 16:10:24 +0000 |
---|---|---|
committer | Alexander Monakov <amonakov@ispras.ru> | 2015-05-11 16:10:24 +0000 |
commit | 2b66d1714e095ab444da1f9cda1e0a017a07d519 (patch) | |
tree | d7e75304c1814d63228cee7fbd6020e839dbb714 /gcc/config/i386 | |
parent | 139a1813ff73100d9ca3af088ea9a4ad2036c2d1 (diff) |
PR target/65753
* config/i386/i386.c (ix86_function_ok_for_sibcall): Allow PIC sibcalls
via function pointers.
testsuite:
* gcc.target/i386/pr65753.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@223005 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/i386.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7bd9ff307b6..fb7977f4d65 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5473,12 +5473,12 @@ ix86_function_ok_for_sibcall (tree decl, tree exp) rtx a, b; /* If we are generating position-independent code, we cannot sibcall - optimize any indirect call, or a direct call to a global function, - as the PLT requires %ebx be live. (Darwin does not have a PLT.) */ + optimize direct calls to global functions, as the PLT requires + %ebx be live. (Darwin does not have a PLT.) */ if (!TARGET_MACHO && !TARGET_64BIT && flag_pic - && (!decl || !targetm.binds_local_p (decl))) + && decl && !targetm.binds_local_p (decl)) return false; /* If we need to align the outgoing stack, then sibcalling would |