[Bug c/24691] New: attribute aligned is silently ignored or program is miscompiled

sabre at nondot dot org gcc-bugzilla@gcc.gnu.org
Sun Nov 6 06:06:00 GMT 2005


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



More information about the Gcc-bugs mailing list