This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]