aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-12-09 22:26:29 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2007-12-09 22:26:29 +0100
commit23372b3faa69cba81f23504e56a56c9bbdb48166 (patch)
tree2e8a54c441e89ce480be1ab17f54a52611672c65 /gcc/cp/decl2.c
parent799a6e360249a55a9b745e5ece49326480072a79 (diff)
downloadgcc-23372b3faa69cba81f23504e56a56c9bbdb48166.zip
gcc-23372b3faa69cba81f23504e56a56c9bbdb48166.tar.gz
gcc-23372b3faa69cba81f23504e56a56c9bbdb48166.tar.bz2
re PR c++/34178 (Compilation using -frepo fails)
PR c++/34178 PR c++/34340 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. Return 2 also if DECL_EXPLICIT_INSTANTIATION. * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when flag_use_repository and repo_emit_p returned 2. * g++.dg/template/repo6.C: New test. * g++.dg/template/repo7.C: New test. * g++.dg/template/repo8.C: New test. From-SVN: r130727
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index bf3d598..37a21f7 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2230,7 +2230,8 @@ import_export_decl (tree decl)
{
/* DECL is an implicit instantiation of a function or static
data member. */
- if (flag_implicit_templates
+ if ((flag_implicit_templates
+ && !flag_use_repository)
|| (flag_implicit_inline_templates
&& TREE_CODE (decl) == FUNCTION_DECL
&& DECL_DECLARED_INLINE_P (decl)))