diff options
author | kan <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2005-06-03 03:28:44 +0000 |
commit | d7b0b4f3c615794b038ed6a64e85e9621c90bc91 (patch) | |
tree | 9f886db2860fe9f635cc7c5892af5f347ab96fb5 /contrib/gcc/tree-inline.c | |
parent | f2254cf7022e4e6909272699c8e1f774b7e4e3f1 (diff) | |
parent | 2156e40a831a8e0ab68e4bc091c2940bf46ca6df (diff) | |
download | FreeBSD-src-d7b0b4f3c615794b038ed6a64e85e9621c90bc91.zip FreeBSD-src-d7b0b4f3c615794b038ed6a64e85e9621c90bc91.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r146895,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gcc/tree-inline.c')
-rw-r--r-- | contrib/gcc/tree-inline.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/gcc/tree-inline.c b/contrib/gcc/tree-inline.c index dac0f04..ccc49e7 100644 --- a/contrib/gcc/tree-inline.c +++ b/contrib/gcc/tree-inline.c @@ -1340,7 +1340,8 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) } else if (warn_inline && DECL_DECLARED_INLINE_P (fn) && !DECL_IN_SYSTEM_HEADER (fn) - && strlen (reason)) + && strlen (reason) + && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))) { warning ("%Jinlining failed in call to '%F': %s", fn, fn, reason); warning ("called from here"); @@ -1547,8 +1548,11 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data) splay_tree_delete (id->decl_map); id->decl_map = st; - /* The new expression has side-effects if the old one did. */ - TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (t); + /* Although, from the semantic viewpoint, the new expression has + side-effects only if the old one did, it is not possible, from + the technical viewpoint, to evaluate the body of a function + multiple times without serious havoc. */ + TREE_SIDE_EFFECTS (expr) = 1; /* Replace the call by the inlined body. Wrap it in an EXPR_WITH_FILE_LOCATION so that we'll get debugging line notes |