On Mon, 16 Jul 2018, Eric Botcazou wrote: > > Thanks. In that light the unsharing at the places the FE builds expressions > > using TYPE_SIZE and friends looks like the way to go. > > Probably, yes.
OK, let's see what C family maintainers decide on ultimatively. > > I still wonder why unsharing in gimplify_one_sizepos is necessary though. > > Ist that because even deep unsharing doesn't walk types? > > walk_tree walks the DECL_EXPR of TYPE_DECL. I think that it's an old > band-aid > for types defined at library level in Ada. Let me experiment a bit with that. I do see extra ICEs in the C testsuite with removing the unsharing as well though (without the unsharing fix from above). At least it bootstraps though. Richard.