public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/49671] New: volatile goes missing after inlining
@ 2011-07-07 21:39 pinskia at gcc dot gnu.org
  2011-07-07 21:41 ` [Bug middle-end/49671] [4.6/4.7 Regression] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-07 21:39 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: volatile goes missing after inlining
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pinskia@gcc.gnu.org


Take:
volatile int t;
static inline int cvmx_atomic_get32(volatile int *ptr)
{
    return *ptr;
}
void f(void)
{
  while (!cvmx_atomic_get32(&t))
    ;
}

Nothing fancy but after inlining, we have:
  D.2699_5 = t;
Which is wrong as t is volatile


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

end of thread, other threads:[~2011-07-26  7:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-07 21:39 [Bug middle-end/49671] New: volatile goes missing after inlining pinskia at gcc dot gnu.org
2011-07-07 21:41 ` [Bug middle-end/49671] [4.6/4.7 Regression] " pinskia at gcc dot gnu.org
2011-07-07 22:49 ` pinskia at gcc dot gnu.org
2011-07-07 23:07 ` pinskia at gcc dot gnu.org
2011-07-08 10:31 ` rguenth at gcc dot gnu.org
2011-07-26  5:29 ` pinskia at gcc dot gnu.org
2011-07-26  7:52 ` pinskia at gcc dot gnu.org
2011-07-26  7:53 ` 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).