Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.other / cast5.C
blobbae4f169584e50939ea3ca35539a4081b6a3982e
1 // { dg-do assemble  }
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 4 Feb 2000 <nathan@acm.org>
6 // Array of cv T decays to pointer to cv T, and pointer to array of cv T can
7 // be converted to pointer to cv T. We need to make sure the `cv's don't
8 // confuse us.
10 typedef char const *ary_t[2];
12 void f0 (ary_t const *const &ary)
14   static_cast <void const *> (ary);
15   static_cast <void *> (ary);         // { dg-error "" } casts away const
16   (void const *) (ary);
19 void f1 (ary_t *const &ary)
21   static_cast <void *> (ary);
22   static_cast <void const *> (ary);
23   (void const *) (ary);
26 void f2 (ary_t const *&ary)
28   static_cast <void const *> (ary);
29   static_cast <void *> (ary);         // { dg-error "" } casts away const
30   (void const *) (ary);
33 void f3 (ary_t *&ary)
35   static_cast <void *> (ary);
36   static_cast <void const *> (ary);
37   (void const *) (ary);