aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e13653c..6e05977 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 725dbb3..b3d327d 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 61d8725..30bde12 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 0000000..279da2b
--- /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 () {}