URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.warn/] [cast-align1.C] - Rev 305
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble { target sparc-*-* } }
// { dg-options "-ansi -pedantic-errors -Wcast-align" }
// Copyright (C) 1999 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 7 Dec 1999 <nathan@acm.org>
// converting a T * to void * does not need a complete T, and doesn't
// increase alignment requirements.
struct X;
struct Y;
struct Z {double m;};
void f3 (X *xp, Z *zp)
{
(void *)xp;
(void *)zp;
(Y *)xp;
(Y *)zp;
(Z *)xp;
}
void f4 (char *ptr)
{
(Z *)ptr; // { dg-warning "" } alignment
}
Go to most recent revision | Compare with Previous | Blame | View Log