On Wed, Jul 1, 2020 at 11:06 PM Eric Botcazou <botca...@adacore.com> wrote: > > > Hmm, that's a good question - so would your patch be replaceable by > > simply amending var_decl_component_p by > > > > (var_decl_component_p (TREE_OPERAND (src, 0)) > > > > || TREE_CODE (TREE_OPERAND (src, 0)) == STRING_CST) > > > > ? > > The gimple_call_alloca_for_var_p (stmt) kludge is still needed though and the > end of the transformation needs to be adjusted, so I'm not sure it's better.
Sorry for the ping-pong but why's using a new char[len] type problematic? That said, I do like p2 more even if we need to special-case STRING_CST sources at the end for store-merging to be happy. Thanks, Richard. > -- > Eric Botcazou