aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 2d99e02..62f67e7 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -2099,6 +2099,10 @@ cp_cannot_inline_tree_fn (fnp)
{
tree fn = *fnp;
+ if (optimize == 0
+ && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
+ return 1;
+
/* We can inline a template instantiation only if it's fully
instantiated. */
if (DECL_TEMPLATE_INFO (fn)