Hi, As reported in PR92926, constant ctor is shared translation unit wide because of constexpr_call_table, however, during gimplify, the shared ctor could be modified. This patch fixes the issue by unsharing it before modification in gimplify. A test is reduced from cppcoro library and added.
Bootstrap and test ongoing. Not sure if this is the correct fix though, any comments? Thanks, bin 2019-12-13 Bin Cheng <bin.li...@linux.alibaba.com> PR tree-optimization/92926 * gimplify.c (gimplify_init_constructor): Unshare ctor node before clearing. gcc/testsuite 2019-12-13 Bin Cheng <bin.li...@linux.alibaba.com> PR tree-optimization/92926 * g++.dg/pr92926.C: New test.
0001-pr92926.patch
Description: Binary data