------- Comment #1 from rguenth at gcc dot gnu dot org 2007-07-10 16:15 ------- Indeed. CCP propagates the constant addresses &spinlock and &spinlock[1] to the deref sides which loses the volatile qualifier from the access. Disabling that leads to VRP which does the same. Then DOM which does the same. Then store-ccp which is not disabled by -fno-tree-ccp. So, finally,
-O2 -fno-tree-ccp -fno-tree-vrp -fno-tree-dominator-opts -fno-tree-store-ccp makes it work. Maybe this one is stretching what we want to support... -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-07-10 16:15:57 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32721