aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/rtti.c3
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/abi/rtti2.C12
4 files changed, 21 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ca4839c..21d16c0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2002-11-22 Mark Mitchell <mark@codesourcery.com>
+
+ * rtti.c (qualifier_flags): Fix thinko.
+
2002-11-21 Glen Nakamura <glen@imodulo.com>
PR c++/8342
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index d6ddf13..17942c3 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -685,8 +685,7 @@ qualifier_flags (type)
tree type;
{
int flags = 0;
- /* we want the qualifiers on this type, not any array core, it might have */
- int quals = TYPE_QUALS (type);
+ int quals = cp_type_quals (type);
if (quals & TYPE_QUAL_CONST)
flags |= 1;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 24b6900..94ebf42 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-11-22 Mark Mitchell <mark@codesourcery.com>
+
+ * g++.dg/abi/rtti2.C: New test.
+
2002-11-21  Eric Botcazou  <ebotcazou@libertysurf.fr>
* gcc.dg/i386-unroll-1.c: New test.
diff --git a/gcc/testsuite/g++.dg/abi/rtti2.C b/gcc/testsuite/g++.dg/abi/rtti2.C
new file mode 100644
index 0000000..eece872
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/rtti2.C
@@ -0,0 +1,12 @@
+// { dg-do run }
+
+#include <cxxabi.h>
+#include <typeinfo>
+
+int main () {
+ const std::type_info& ti = typeid (const int (*)[3]);
+ const abi::__pointer_type_info& pti
+ = static_cast<const abi::__pointer_type_info&>(ti);
+ if ((pti.__flags & pti.__const_mask) == 0)
+ return 1;
+}