summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-16 00:25:01 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-16 00:25:01 +0000
commitc40c1730800ed292b6db39a83d592476fa59623c (patch)
treeec5a59cb438227550050c736b88b5d336c4657c2
parent362f678b762a1c88e907339adb843e74c989fbbe (diff)
downloadgcc-c40c1730800ed292b6db39a83d592476fa59623c.tar.gz
PR c++/22204
* repo.c (repo_emit_p): Robustify. PR c++/22204 * g++.dg/rtti/repo1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102073 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/repo.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/rtti/repo1.C15
4 files changed, 27 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e13653c4a24..6e059778988 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-15 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/22204
+ * repo.c (repo_emit_p): Robustify.
+
2005-07-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR c++/22452
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 725dbb315f1..b3d327d4b00 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -285,7 +285,8 @@ repo_emit_p (tree decl)
else if (DECL_TINFO_P (decl))
type = TREE_TYPE (DECL_NAME (decl));
if (!DECL_TEMPLATE_INSTANTIATION (decl)
- && !CLASSTYPE_TEMPLATE_INSTANTIATION (type))
+ && (!TYPE_LANG_SPECIFIC (type)
+ || !CLASSTYPE_TEMPLATE_INSTANTIATION (type)))
return 2;
}
else if (!DECL_TEMPLATE_INSTANTIATION (decl))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 61d87257fef..30bde128ae4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-15 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/22204
+ * g++.dg/rtti/repo1.C: New test.
+
2005-07-15 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/22398
diff --git a/gcc/testsuite/g++.dg/rtti/repo1.C b/gcc/testsuite/g++.dg/rtti/repo1.C
new file mode 100644
index 00000000000..279da2b43a8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/repo1.C
@@ -0,0 +1,15 @@
+// PR c++/22204
+// { dg-options "-frepo" }
+
+#include <typeinfo>
+template<int>
+struct function1
+{
+ function1()
+ {
+ typeid(int[100]);
+ }
+};
+function1<1> b;
+
+int main () {}