diff options
author | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-11 16:10:24 +0000 |
---|---|---|
committer | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-11 16:10:24 +0000 |
commit | a91ca74babad522b1d27fc68f10e5188db63537c (patch) | |
tree | d7e75304c1814d63228cee7fbd6020e839dbb714 /gcc/config | |
parent | 562ef5ccc46d9786275a40639fa56fa12ad7e476 (diff) | |
download | gcc-a91ca74babad522b1d27fc68f10e5188db63537c.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223005 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-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 |