[Bug c/22278] New: gcc -O2 discards cast to volatile

2005-07-02 Thread olivier dot baudron at m4x dot org
Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: olivier dot baudron at m4x dot org CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla

[Bug c/22278] gcc -O2 discards cast to volatile

2005-07-02 Thread olivier dot baudron at m4x dot org
--- Additional Comments From olivier dot baudron at m4x dot org 2005-07-02 16:59 --- I am not sure this is the same problem. Besides, the following code is *not* optimized away with -O2: void test (volatile char *addr) { *addr; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi