diff options
author | Nick Clifton <nickc@redhat.com> | 2016-01-26 14:02:11 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2016-01-26 14:02:11 +0000 |
commit | b8b025dc0b76361d1276288aeeda6b4ebc5e2061 (patch) | |
tree | 85a75b137ef746056c32fbbecea2c17ab624a329 /gcc | |
parent | b1b46af04f50513e823845c5f782860814f1f40c (diff) | |
download | gcc-b8b025dc0b76361d1276288aeeda6b4ebc5e2061.zip gcc-b8b025dc0b76361d1276288aeeda6b4ebc5e2061.tar.gz gcc-b8b025dc0b76361d1276288aeeda6b4ebc5e2061.tar.bz2 |
re PR target/66655 (miscompilation due to ipa-ra on MinGW)
PR target/66655
* config/i386/winnt.c (i386_pe_binds_local_p): If a function has
been marked as DECL_ONE_ONLY but we do not the means to make it
so, then do not allow it to bind locally.
From-SVN: r232828
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e84acc1..4dba48f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-01-26 Nick Clifton <nickc@redhat.com> + + PR target/66655 + * config/i386/winnt.c (i386_pe_binds_local_p): If a function has + been marked as DECL_ONE_ONLY but we do not the means to make it + so, then do not allow it to bind locally. + 2016-01-26 Jakub Jelinek <jakub@redhat.com> PR lto/69254 diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 53abf47..e2b2f4b 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -341,6 +341,20 @@ i386_pe_binds_local_p (const_tree exp) && TREE_PUBLIC (exp) && DECL_EXTERNAL (exp)) return true; + +#ifndef MAKE_DECL_ONE_ONLY + /* PR target/66655: If a function has been marked as DECL_ONE_ONLY + but we do not the means to make it so, then do not allow it to + bind locally. */ + if (DECL_P (exp) + && TREE_CODE (exp) == FUNCTION_DECL + && TREE_PUBLIC (exp) + && DECL_ONE_ONLY (exp) + && ! DECL_EXTERNAL (exp) + && DECL_DECLARED_INLINE_P (exp)) + return false; +#endif + return default_binds_local_p_1 (exp, 0); } |