public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52238] New: -mms-bitfields: __attribute__ ((aligned (n))) ignored for struct members
@ 2012-02-13 19:14 michael.kostylev at gmail dot com
  2012-02-14 12:22 ` [Bug target/52238] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: michael.kostylev at gmail dot com @ 2012-02-13 19:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52238

             Bug #: 52238
           Summary: -mms-bitfields: __attribute__ ((aligned (n))) ignored
                    for struct members
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: michael.kostylev@gmail.com


The following test case

% cat > test.c << __EOF && gcc -mms-bitfields test.c && { ./a.out ; echo $? ; }
struct {
    char a;
    char b __attribute__ ((aligned (16)));
} s;

int main()
{
    return (__PTRDIFF_TYPE__)&s.b & 15;
}
__EOF

returns 1, since s.b is not 16-byte aligned (with -mno-ms-bitfields it returns
0, as expected). The test passes with 4.1.2, but fails with 4.2.1 and above.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-02-22 16:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 19:14 [Bug c/52238] New: -mms-bitfields: __attribute__ ((aligned (n))) ignored for struct members michael.kostylev at gmail dot com
2012-02-14 12:22 ` [Bug target/52238] " rguenth at gcc dot gnu.org
2012-02-15 18:42 ` ktietz at gcc dot gnu.org
2012-02-16 13:34 ` michael.kostylev at gmail dot com
2012-02-16 14:09 ` ktietz at gcc dot gnu.org
2012-02-17  0:20 ` rafael.carre at gmail dot com
2012-02-17 11:05 ` michael.kostylev at gmail dot com
2012-02-18 10:06 ` michael.kostylev at gmail dot com
2012-02-18 22:56 ` ktietz at gcc dot gnu.org
2012-02-20 22:06 ` ktietz at gcc dot gnu.org
2012-02-20 22:19 ` ktietz at gcc dot gnu.org
2012-02-20 22:25 ` ktietz at gcc dot gnu.org
2012-02-22 16:46 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).