This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/22000] [4.0/4.1 Regression] Read from volatile member of struct is optimized away


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-06-23 15:11 -------
I somewhat suspect this hunk of code in c-typeck.c:build_component_ref:

	  if (TREE_THIS_VOLATILE (datum) || TREE_THIS_VOLATILE (subdatum))
	    TREE_THIS_VOLATILE (ref) = 1;

I don't see anything that sets TREE_SIDE_EFFECTS.

However, from tree.h:

   If this bit is set in an expression, so is TREE_SIDE_EFFECTS.  */
   #define TREE_THIS_VOLATILE(NODE) ((NODE)->common.volatile_flag)

However, I'm having a hard time getting good connectivity back to my build
machine to experiment with this.

Joseph, any ideas about this?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joseph at codesourcery dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22000


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]