[Bug target/34584] New: alignment on .comm symbol ignored
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 25 05:18:00 GMT 2007
A simple testcase to check if the attribute aligned works, fails on
i386-darwin-apple:
#include <stdio.h>
#include <stdlib.h>
int array[4128] __attribute__((aligned( 2<<6)));
int main(void)
{
__SIZE_TYPE__ a = (__SIZE_TYPE__)(&array[0]);
printf("%d\n", (int)(__SIZE_TYPE__)a & ((2<<6) - 1));
if((__SIZE_TYPE__)(a) &((2<<6) - 1))
abort ();
return 0;
}
---- CUT ----
Note I used a seperate variable for the address to work around the fact the
trunk can fold out the alignment check.
--
Summary: alignment on .comm symbol ignored
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: i386-darwin-apple
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34584
More information about the Gcc-bugs
mailing list