diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-05 11:43:38 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-05 11:43:38 +0000 |
commit | fa1cc29d4ff399154bd4fa48d7717cba5027a02e (patch) | |
tree | 997232f16181a9510cc7119f7063bd84d3333404 /gcc/tree-inline.c | |
parent | 5938768b7c6cfe6100fdc0898e8f66de25382be8 (diff) | |
download | gcc-fa1cc29d4ff399154bd4fa48d7717cba5027a02e.tar.gz |
PR tree-optimization/33763
* tree-inline.c (expand_call_inline): Silently ignore always_inline
attribute for redefined extern inline functions.
* c-c++-common/pr33763.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192119 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index a585c0b88dc..d6fbf50dae9 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3814,6 +3814,12 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) goto egress; if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) + /* For extern inline functions that get redefined we always + silently ignored always_inline flag. Better behaviour would + be to be able to keep both bodies and use extern inline body + for inlining, but we can't do that because frontends overwrite + the body. */ + && !cg_edge->callee->local.redefined_extern_inline /* Avoid warnings during early inline pass. */ && cgraph_global_info_ready /* PR 20090218-1_0.c. Body can be provided by another module. */ |