On Fri, 9 Jan 2015 13:30:45, Jakub Jelinke wrote: > > On Fri, Jan 09, 2015 at 01:12:09PM +0100, Bernd Edlinger wrote: >>>> should be equivalent to >>>> >>>> if (DECL_P (base) && !may_be_aliased (base)) >>>> return false; >>>> >>>> is that right? >>> >>> Yes, well, not exactly, but I wonder if its worth doing the extra check >>> if you only check decl accesses anyway and not indirect accesses. >>> >> >> >> I think Jakub, you wrote that initially, any comments on that? > > I think it was still from Dmitry's code. If you can make it work by taking > address of base and offsetting it, it works for me. Just note that I think > base doesn't have to be always addressable, so you probably should punt if > it is not rather than assert it is. If something is not addressable, then > it can't be accessed by multiple threads. >
Thanks. FYI: the VIEW_CONVERT_EXPR did not fail in the gcc_checking_assert (is_gimple_addressable (base)) but much later, somewhere in tree-cfg.c it dropped out. Maybe that assert does not check exactly what is needed for a valid argument of ADDR_EXPR ? I mean I can somehow fold an ADDR_EXPR of a bit field member, This won't crash at all, but I can't fold ADDR_EXPR(VIEW_CONVERT_EXPR). Bernd.