This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26933] Volatile member in struct member accessed/written implicitly
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jan 2016 21:53:41 +0000
- Subject: [Bug middle-end/26933] Volatile member in struct member accessed/written implicitly
- Auto-submitted: auto-generated
- References: <bug-26933-4 at http dot gcc dot gnu dot org/bugzilla/>
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)"