* g++.old-deja/g++.abi/ptrflags.C: Correct and extend.

From-SVN: r33727
This commit is contained in:
Nathan Sidwell 2000-05-06 15:53:16 +00:00 committed by Nathan Sidwell
parent 1b846cccc6
commit 846cf1223e
2 changed files with 22 additions and 14 deletions

View File

@ -1,3 +1,7 @@
2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.abi/ptrflags.C: Correct and extend.
2000-05-05 David Billinghurst <David Billinghurst@riotinto.com.au> 2000-05-05 David Billinghurst <David Billinghurst@riotinto.com.au>
* g77.f-torture/execute/20000503-1.f: New test. * g77.f-torture/execute/20000503-1.f: New test.

View File

@ -14,8 +14,8 @@ using namespace abi;
int expect (int flags, type_info const &info) int expect (int flags, type_info const &info)
{ {
__pointer_class_type_info const *ptr = __pointer_type_info const *ptr =
dynamic_cast <__pointer_class_type_info const *> (&info); dynamic_cast <__pointer_type_info const *> (&info);
if (!ptr) if (!ptr)
return 0; return 0;
if (ptr->quals != flags) if (ptr->quals != flags)
@ -31,25 +31,29 @@ int main ()
return 2; return 2;
if (! expect (2, typeid (A volatile *))) if (! expect (2, typeid (A volatile *)))
return 3; return 3;
if (! expect (4, typeid (A __restrict__ *))) if (! expect (4, typeid (A *__restrict__ *)))
return 4; return 4;
if (! expect (0, typeid (void A::*)) if (! expect (0, typeid (int A::*)))
return 5; return 5;
if (! expect (0, typeid (void A::**)) if (! expect (0, typeid (int A::**)))
return 6; return 6;
if (! expect (8 | 0, typeid (B *))) if (! expect (8 | 0, typeid (B *)))
return 1; return 11;
if (! expect (8 | 1, typeid (B const *))) if (! expect (8 | 1, typeid (B const *)))
return 2; return 12;
if (! expect (8 | 2, typeid (B volatile *))) if (! expect (8 | 2, typeid (B volatile *)))
return 3; return 13;
if (! expect (8 | 4, typeid (B __restrict__ *))) if (! expect (8 | 4, typeid (B *__restrict__ *)))
return 4; return 14;
if (! expect (8 | 0, typeid (void B::*)) if (! expect (16 | 0, typeid (int B::*)))
return 5; return 15;
if (! expect (8 | 0, typeid (void B::**)) if (! expect (8 | 0, typeid (int B::**)))
return 6; return 16;
if (! expect (8 | 0, typeid (B A::*)))
return 17;
if (! expect (24, typeid (B B::*)))
return 18;
return 0; return 0;
} }