Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.warn / cast-align1.C
blob43cecab2351e0c6456510b7b77e12e7e4ce93a09
1 // { dg-do assemble { target sparc-*-* } }
2 // { dg-options "-ansi -pedantic-errors -Wcast-align" }
5 // Copyright (C) 1999 Free Software Foundation, Inc.
6 // Contributed by Nathan Sidwell 7 Dec 1999 <nathan@acm.org>
8 // converting a T * to void * does not need a complete T, and doesn't
9 // increase alignment requirements.
11 struct X;
12 struct Y;
13 struct Z {double m;};
15 void f3 (X *xp, Z *zp)
17   (void *)xp;
18   (void *)zp;
19   (Y *)xp;
20   (Y *)zp;
21   (Z *)xp;
24 void f4 (char *ptr)
26   (Z *)ptr;           // { dg-warning "" } alignment