summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2006-08-27 17:45:25 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2006-08-27 17:45:25 +0000
commit99f4234aa713145f873b2295a4d62dd388489e64 (patch)
tree61cd571210dd2a9eb140c6a82736f3e05ddaac45 /gcc/cp/decl2.c
parentbf87e098aefb413abaa78ec5e0d37dc7366c2c86 (diff)
downloadgcc-99f4234aa713145f873b2295a4d62dd388489e64.tar.gz
re PR c++/28058 (ICE in inline_forbidden_p)
PR c++/28058 * pt.c (register_specialization): Return error_mark_node for specialization-after-instantiation. * decl2.c (mark_used): Mark the main function used when one of its clones is used. PR c++/28058 * g++.dg/template/spec31.C: New test. From-SVN: r116491
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index db1e9179a2b..a6187e28006 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3494,6 +3494,8 @@ mark_used (tree decl)
}
TREE_USED (decl) = 1;
+ if (DECL_CLONED_FUNCTION_P (decl))
+ TREE_USED (DECL_CLONED_FUNCTION (decl)) = 1;
/* If we don't need a value, then we don't need to synthesize DECL. */
if (skip_evaluation)
return;