This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24691] New: attribute aligned is silently ignored or program is miscompiled
- From: "sabre at nondot dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Nov 2005 06:06:51 -0000
- Subject: [Bug c/24691] New: attribute aligned is silently ignored or program is miscompiled
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This program shows a bug: either attribute align is being accepted when it
shouldn't be, or it is being accepted but not doing it's job:
int foo() {
int __attribute__((aligned(1024))) X;
printf("%d\n", (int)&X & 1023);
}
int main() {
foo();
}
On my machine, this prints "752".
-Chris
--
Summary: attribute aligned is silently ignored or program is
miscompiled
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sabre at nondot dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24691