public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23702] New: volatile const members of structures not treated as volatile
@ 2005-09-02 19:32 Steve at Zook dot com
2005-09-02 19:34 ` [Bug c++/23702] " Steve at Zook dot com
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Steve at Zook dot com @ 2005-09-02 19:32 UTC (permalink / raw)
To: gcc-bugs
Volatile const members of a struct are not generating a load when read while
volatile non-const members are loaded (volatile const objects outside of a
structure do generate a load when read). const members of a volatile struct
generate two loads when read (strange code being produced in this case). This
has been seen in 3.3.3 (for x86 and m68k targets) and 3.4.4 (for m68k targets,
untested on x86). The attached test.cpp file when compiled gcc -c -save-temps
test.cpp on 3.3.3 under cygwin (x86 target) produces the attached test.s
output. Multiple stores on volatile const members of structs get optimized
away as well (this is not demonstrated in the attached test code). Note that
when the test code is compiled as C rather than C++, correct code gets
produced.
--
Summary: volatile const members of structures not treated as
volatile
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Steve at Zook dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23702
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/23702] volatile const members of structures not treated as volatile
2005-09-02 19:32 [Bug c++/23702] New: volatile const members of structures not treated as volatile Steve at Zook dot com
@ 2005-09-02 19:34 ` Steve at Zook dot com
2005-09-02 19:36 ` Steve at Zook dot com
2005-09-19 20:07 ` Steve at Zook dot com
2 siblings, 0 replies; 5+ messages in thread
From: Steve at Zook dot com @ 2005-09-02 19:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Steve at Zook dot com 2005-09-02 19:33 -------
Created an attachment (id=9652)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9652&action=view)
Test code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23702
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/23702] volatile const members of structures not treated as volatile
2005-09-02 19:32 [Bug c++/23702] New: volatile const members of structures not treated as volatile Steve at Zook dot com
2005-09-02 19:34 ` [Bug c++/23702] " Steve at Zook dot com
@ 2005-09-02 19:36 ` Steve at Zook dot com
2005-09-19 20:07 ` Steve at Zook dot com
2 siblings, 0 replies; 5+ messages in thread
From: Steve at Zook dot com @ 2005-09-02 19:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Steve at Zook dot com 2005-09-02 19:36 -------
Created an attachment (id=9653)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9653&action=view)
Sample compiled output for test code
This sample was compiled:
gcc -c -save-temps test.cpp
on rev 3.3.3 under Cygwin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23702
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/23702] volatile const members of structures not treated as volatile
2005-09-02 19:32 [Bug c++/23702] New: volatile const members of structures not treated as volatile Steve at Zook dot com
2005-09-02 19:34 ` [Bug c++/23702] " Steve at Zook dot com
2005-09-02 19:36 ` Steve at Zook dot com
@ 2005-09-19 20:07 ` Steve at Zook dot com
2 siblings, 0 replies; 5+ messages in thread
From: Steve at Zook dot com @ 2005-09-19 20:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Steve at Zook dot com 2005-09-19 20:06 -------
Test using i686-pc-cygwin with revision 4.0.1 shows problem resolved and good
code being emitted (although two new warnings are output about non-local
anonymous variables).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23702
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/23702] volatile const members of structures not treated as volatile
[not found] <bug-23702-7493@http.gcc.gnu.org/bugzilla/>
@ 2009-08-25 13:59 ` bangerth at gmail dot com
0 siblings, 0 replies; 5+ messages in thread
From: bangerth at gmail dot com @ 2009-08-25 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from bangerth at gmail dot com 2009-08-25 13:59 -------
gcc 3.3 has not been maintained for a long time. Since you say that gcc 4.0
fixes the bug, I think we can close the bug.
W.
--
bangerth at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at gmail dot com
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23702
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-25 13:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-02 19:32 [Bug c++/23702] New: volatile const members of structures not treated as volatile Steve at Zook dot com
2005-09-02 19:34 ` [Bug c++/23702] " Steve at Zook dot com
2005-09-02 19:36 ` Steve at Zook dot com
2005-09-19 20:07 ` Steve at Zook dot com
[not found] <bug-23702-7493@http.gcc.gnu.org/bugzilla/>
2009-08-25 13:59 ` bangerth at gmail dot com
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).