This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22000] [4.0 Regression] Read from volatile member of struct is optimized away
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2005 14:12:18 -0000
- Subject: [Bug tree-optimization/22000] [4.0 Regression] Read from volatile member of struct is optimized away
- References: <20050610135925.22000.rpedersen@atmel.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-06-13 14:12 -------
(In reply to comment #6)
> Changing the expression for accessing the volatile member
> of the struct to:
> "(volatile int)ptr->b;"
> or just:
> "ptr->b;"
> still leads to the access being optimized away.
Which seems like the real problem, as volatile access
sematics should clearly apply in both instances.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22000