From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2627 invoked by alias); 30 Jan 2013 23:24:55 -0000 Received: (qmail 2578 invoked by uid 48); 30 Jan 2013 23:24:37 -0000 From: "regehr at cs dot utah.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/47409] volatile struct member bug Date: Wed, 30 Jan 2013 23:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: regehr at cs dot utah.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg02821.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47409 --- Comment #12 from John Regehr 2013-01-30 23:24:36 UTC --- (In reply to comment #10) > As said previously I think that volatile struct members are ill-defined. As far as the C standard goes, I believe the situation is clear: a volatile struct member is a volatile-qualified variable and the rules for volatile variables apply to it. Clang, for example, turns foo() into a load + store at all optimization levels. I believe the Intel compiler does as well but I don't have it available right now.