Compiling the test case at PR 46897 with -Wall shows the bogus warning:
warning: ‘__copy_component_parent_child_module_Child’ defined but not used [-Wunused-function]
I wonder whether one should use "!sym->attr.artificial" to silence the warning or whether some other approach is better.
See also similar warnings (but for user code, where the function is actually used) at PR 54221.
I think this may have been fixed by r192620.