This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49191] gcc.dg/memcpy-3.c FAILs on SPARC
- From: "sje at cup dot hp.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 18:13:36 +0000
- Subject: [Bug middle-end/49191] gcc.dg/memcpy-3.c FAILs on SPARC
- Auto-submitted: auto-generated
- References: <bug-49191-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49191
--- Comment #10 from Steve Ellcey <sje at cup dot hp.com> 2011-06-08 18:12:40 UTC ---
How about compiling this with -Wcast-align and looking for a warning message:
char *y;
typedef char __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) c;
c *z;
void foo(void)
{
z = (c *) y;
}
I get a warning on IA64 but none on X86. The warning is coming from
c-typeck.c.
x.c: In function 'foo':
x.c:6:13: warning: cast increases required alignment of target type
[-Wcast-align]