public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23623] New: volatile keyword changes bitfield access size from 32bit to 8bit
@ 2005-08-29 14:11 m dot reszat at kostal dot com
  2005-08-29 15:39 ` [Bug middle-end/23623] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: m dot reszat at kostal dot com @ 2005-08-29 14:11 UTC (permalink / raw)
  To: gcc-bugs

struct
{
   unsigned int b : 1;
} bf1;

volatile struct
{
   unsigned int b : 1;
} bf2;

void test(void)
{
   bf1.b = 1;
   bf2.b = 1;
}

Access to bf1.b is correctly done as 32-bits (lwz/stw opcodes), bf2.b is
accessed as 8-bits (lbz/stb opcodes). GCC3.4.3 shows the same behaviour, can't
go back any further. The same happens when the bitfield itself is made volatile,
not the whole struct.

-- 
           Summary: volatile keyword changes bitfield access size from 32bit
                    to 8bit
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: m dot reszat at kostal dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin
GCC target triplet: powerpc-elf-eabispe


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


^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <bug-23623-11259@http.gcc.gnu.org/bugzilla/>]
[parent not found: <bug-23623-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-27  7:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-29 14:11 [Bug c/23623] New: volatile keyword changes bitfield access size from 32bit to 8bit m dot reszat at kostal dot com
2005-08-29 15:39 ` [Bug middle-end/23623] " pinskia at gcc dot gnu dot org
2005-08-29 16:21 ` pinskia at gcc dot gnu dot org
2005-08-29 21:27 ` falk at debian dot org
2005-08-30  7:59 ` m dot reszat at kostal dot com
2005-08-30 12:44 ` falk at debian dot org
2005-08-30 12:51 ` rearnsha at gcc dot gnu dot org
2005-08-30 13:42 ` m dot reszat at kostal dot com
2005-08-30 14:06 ` rearnsha at gcc dot gnu dot org
2005-09-08 15:12 ` m dot reszat at kostal dot com
     [not found] <bug-23623-11259@http.gcc.gnu.org/bugzilla/>
2006-03-28 18:03 ` pbrook at gcc dot gnu dot org
2006-03-29 15:22 ` pbrook at gcc dot gnu dot org
2006-03-29 17:44 ` pbrook at gcc dot gnu dot org
2006-05-16 17:15 ` pinskia at gcc dot gnu dot org
2006-08-02 11:30 ` jason dot morgan at vpnsolutions dot uk dot com
2009-01-13 10:12 ` frikkie at zitera dot co dot za
2009-01-13 10:42 ` frikkie at zitera dot co dot za
2009-01-13 15:52 ` frikkie at zitera dot co dot za
     [not found] <bug-23623-4@http.gcc.gnu.org/bugzilla/>
2013-06-08 19:57 ` sandra at codesourcery dot com
2013-06-14  2:59 ` sandra at codesourcery dot com
2013-10-07 15:40 ` sandra at codesourcery dot com
2013-12-11 16:50 ` edlinger at gcc dot gnu.org
2013-12-11 16:59 ` edlinger at gcc dot gnu.org
2014-02-27  7:28 ` jye2 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).