]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rtti2.C: New test.
authorMark Mitchell <mark@codesourcery.com>
Fri, 22 Nov 2002 23:19:17 +0000 (23:19 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 22 Nov 2002 23:19:17 +0000 (23:19 +0000)
* g++.dg/abi/rtti2.C: New test.

* rtti.c (qualifier_flags): Fix thinko.

From-SVN: r59391

gcc/cp/ChangeLog
gcc/cp/rtti.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/rtti2.C [new file with mode: 0644]

index ca4839cb84ac46c465babb0b9249c5f5d0737a6d..21d16c00443772454ff73eb1b647ccece75fccd9 100644 (file)
@@ -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
index d6ddf131bc1c13afb5f7770b1697fee8ef1cc7b8..17942c30fd6f49a7cc9deddd7e38531fb08bcbde 100644 (file)
@@ -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;
index 24b69002af81f8879759fd3dc0de154d95cd6f1a..94ebf42ae136b359e737be8412f2ca84eb8a4744 100644 (file)
@@ -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 (file)
index 0000000..eece872
--- /dev/null
@@ -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;
+}