summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/tree-inline.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2005-06-03 03:28:44 +0000
committerkan <kan@FreeBSD.org>2005-06-03 03:28:44 +0000
commit2156e40a831a8e0ab68e4bc091c2940bf46ca6df (patch)
treef0dc8ad34f9fcaf27052e24e893a4284b5fee6e9 /contrib/gcc/tree-inline.c
parent0a20abcc95340c9d2bb59421bac84eca4fb43b0c (diff)
downloadFreeBSD-src-2156e40a831a8e0ab68e4bc091c2940bf46ca6df.zip
FreeBSD-src-2156e40a831a8e0ab68e4bc091c2940bf46ca6df.tar.gz
Gcc 3.4.4 release.
Diffstat (limited to 'contrib/gcc/tree-inline.c')
-rw-r--r--contrib/gcc/tree-inline.c10
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
OpenPOWER on IntegriCloud