summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-22 23:19:17 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-22 23:19:17 +0000
commitb112d8735d87d75727df0da6a8cc6fa773b02c29 (patch)
tree42a5ad3156c1c922e60a485f810e47309776fe22
parent2900719d7723017a3945e32af1c9802c67d2cfcc (diff)
downloadppe42-gcc-b112d8735d87d75727df0da6a8cc6fa773b02c29.tar.gz
ppe42-gcc-b112d8735d87d75727df0da6a8cc6fa773b02c29.zip
* g++.dg/abi/rtti2.C: New test.
* rtti.c (qualifier_flags): Fix thinko. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59391 138bc75d-0d04-0410-961f-82ee72b054a4
-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 ca4839cb84a..21d16c00443 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 d6ddf131bc1..17942c30fd6 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 24b69002af8..94ebf42ae13 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 00000000000..eece8724a2a
--- /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;
+}
OpenPOWER on IntegriCloud