diff options
author | Mark Mitchell <mark@codesourcery.com> | 2002-11-22 23:19:17 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2002-11-22 23:19:17 +0000 |
commit | 05abed76a9a443782d8bf3aee18ccc6f3e5fa8dc (patch) | |
tree | 42a5ad3156c1c922e60a485f810e47309776fe22 | |
parent | dd06be9e8d59e0678a74c1591a1f62376ba8a02d (diff) | |
download | gcc-05abed76a9a443782d8bf3aee18ccc6f3e5fa8dc.zip gcc-05abed76a9a443782d8bf3aee18ccc6f3e5fa8dc.tar.gz gcc-05abed76a9a443782d8bf3aee18ccc6f3e5fa8dc.tar.bz2 |
rtti2.C: New test.
* g++.dg/abi/rtti2.C: New test.
* rtti.c (qualifier_flags): Fix thinko.
From-SVN: r59391
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/rtti.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/abi/rtti2.C | 12 |
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; +} |