public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47409] New: volatile struct member bug
@ 2011-01-22  4:13 regehr at cs dot utah.edu
  2011-01-22  5:08 ` [Bug c/47409] " regehr at cs dot utah.edu
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: regehr at cs dot utah.edu @ 2011-01-22  4:13 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: volatile struct member bug
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: regehr@cs.utah.edu


The load/store shouldn't go away (especially at -O0).

regehr@home:~$ current-gcc -O0 vol.c -S -o - 
foo:
    pushl    %ebp
    movl    %esp, %ebp
    popl    %ebp
    ret

regehr@home:~$ cat small.c

const volatile int g_2 = 1;
int g_1 = 0;

void func_1 (void) {
   g_1 = g_2;
}

int main (void) {
  g_1 = g_2;
  return 0;
}

regehr@home:~$ current-gcc -v

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/mnt/z/z/compiler-install/gcc-r169118-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/mnt/z/z/compiler-install/gcc-r169118-install
--program-prefix=r169118- --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 20110122 (experimental) (GCC)


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

end of thread, other threads:[~2024-01-18  6:02 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22  4:13 [Bug c/47409] New: volatile struct member bug regehr at cs dot utah.edu
2011-01-22  5:08 ` [Bug c/47409] " regehr at cs dot utah.edu
2011-01-24 16:47 ` jakub at gcc dot gnu.org
2011-01-24 16:53 ` regehr at cs dot utah.edu
2011-01-24 16:57 ` jakub at gcc dot gnu.org
2011-01-25  2:17 ` joseph at codesourcery dot com
2011-01-25 11:11 ` rguenth at gcc dot gnu.org
2011-01-25 16:24 ` regehr at cs dot utah.edu
2011-01-25 17:28 ` joseph at codesourcery dot com
2013-01-30  4:36 ` regehr at cs dot utah.edu
2013-01-30 11:39 ` rguenth at gcc dot gnu.org
2013-01-30 11:44 ` jakub at gcc dot gnu.org
2013-01-30 23:24 ` regehr at cs dot utah.edu
2013-02-06 11:47 ` jakub at gcc dot gnu.org
2013-02-06 15:00 ` jason at gcc dot gnu.org
2013-02-07  1:42 ` joseph at codesourcery dot com
2013-07-09  8:48 ` francesco.zappa.nardelli at gmail dot com
2013-09-13  9:38 ` rguenth at gcc dot gnu.org
2013-09-13  9:52 ` rguenth at gcc dot gnu.org
2013-09-13 10:38 ` francesco.zappa.nardelli at gmail dot com
2013-09-13 11:51 ` rguenth at gcc dot gnu.org
2013-09-13 14:46 ` francesco.zappa.nardelli at gmail dot com
2014-02-16 13:13 ` jackie.rosen at hushmail dot com
2021-08-05 23:52 ` pinskia at gcc dot gnu.org
2022-07-17 21:00 ` pinskia at gcc dot gnu.org
2024-01-18  6:02 ` pinskia 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).