This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34584] New: alignment on .comm symbol ignored
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Dec 2007 05:18:05 -0000
- Subject: [Bug target/34584] New: alignment on .comm symbol ignored
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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