------- Comment #1 from rguenth at gcc dot gnu dot org 2008-12-10 17:37 ------- Note that the reason the diagnostic happens is either a bug in libstdc++ or the points-to solver or the TBAA pruning in the points-to solver.
In the end we access the object 'ctx' via a pointer of type const struct _Rb_tree_node *. So the question is if anywhere in 'ctx' there is such a struct. It seems to access the _M_t._M_impl._M_header field which is a _Rb_tree_node_base but I cannot see a _Rb_tree_node object in it. Instead _Rb_tree_node is derived from _Rb_tree_node_base and adds a _M_value_field. But accessing this via this path in struct _Rb_tree_impl : public _Node_allocator { _Key_compare _M_key_compare; _Rb_tree_node_base _M_header; size_type _M_node_count; certainly violates aliasing rules. I do not see what _Rb_tree_impl::_S_value wants to access. There seems to be nothing there? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |libstdc++ Keywords| |diagnostic http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38477