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 middle-end/26933] Volatile member in struct member accessed/written implicitly


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26933

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |msebor at gcc dot gnu.org
      Known to work|                            |5.3.0, 6.0
         Resolution|---                         |FIXED

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
With 5.3.0 and 6.0, the bitfield is accessed using the lbz and stb instructions
(on both powerpc64 and powerpc64le).  The test program attached in comment #1
also seems happy.  I think this can be resolved as fixed.

$ /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -S -Wall -Wextra -Wpedantic
-xc -o/dev/stdout -O1 a.c
        .file   "a.c"
        .machine power4
        .section        ".toc","aw"
        .section        ".text"
a.c: In function âfooâ:
a.c:11:17: warning: overflow in implicit constant conversion [-Woverflow]
         data->B=1;
                 ^

        .align 2
        .globl foo
        .section        ".opd","aw"
        .align 3
foo:
        .quad   .L.foo,.TOC.@tocbase,0
        .previous
        .type   foo, @function
.L.foo:
        lbz 9,8(3)
        li 10,-1
        rldimi 9,10,7,32
        stb 9,8(3)
        lwz 3,12(3)
        blr
        .long 0
        .byte 0,0,0,0,0,0,0,0
        .size   foo,.-.L.foo
        .ident  "GCC: (GNU) 6.0.0 20160119 (experimental)"

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