This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Test gcc.c-torture/execute/align-3.c
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc at gcc dot gnu dot org, gkeating at apple dot com
- Date: Wed, 11 Jul 2007 16:48:52 -0700 (PDT)
- Subject: Test gcc.c-torture/execute/align-3.c
- Reply-to: sje at cup dot hp dot com
The test gcc.c-torture/execute/align-3.c is failing on most of my
platforms, including IA64 HP-UX and Linux. The test consists of:
void func(void) __attribute__((aligned(256)));
void func(void)
{
}
int main()
{
if (((long)func & 0xFF) != 0)
abort ();
if (__alignof__(func) != 256)
abort ();
return 0;
}
The problem I am having is with the first test, checking that the
address of func is aligned. The problem is that using func in this way
on IA64 gives me the address of the function descriptor, not the address
of the function itself. And while the function address does appear to
be aligned on a 256 byte boundry, the function descriptor has its normal
8 byte alignment. My question is, should function descriptors have the
same alignment as functions or is this just an invalid test on systems
that use function descriptors?
Steve Ellcey
sje@cup.hp.com