On 6/6/22 08:20, Kewen.Lin wrote: > |Hi, PR105459 exposes one issue in inline_call handling that when it decides > to copy FP flags from callee to caller and rebuild the optimization node for > caller fndecl, it's possible that the target option node is also necessary to > be rebuilt. Without updating target option node early, it can make nodes > share the same target option node wrongly, later when we want to unshare it > somewhere (like in target hook) it can get unexpected results, like ICE on > uninitialized secondary member of target globals exposed in this PR.|
Hello. I think your patch seems reasonable. As you mentioned we need to keep pair of target and optimization nodes together and the only correct way is by using build_target_option_node for the DECL_FUNCTION_SPECIFIC_TARGET. Thanks for the fix. Martin