ipa: Add missing call to duplication hooks [PR ipa/125121]

This patch adds a missing call to edge duplication hooks in
cgraph_edge::make_callback.

In PR125121, we get an ICE in ipa-sra when compiling with -fno-ipa-cp,
because the analysis in ipa-prop runs after sra generates its summaries.
Because of the missing call to the hooks, the summaries required by sra
don't get copied over for the newly added callback edges, leading to
segfaults.  This patch adds the call to the hooks to remedy this.  It
also changes some of the initialization logic for summaries for callback
edges to make it a little more consistent.

	PR ipa/125121

gcc/ChangeLog:

	* cgraph.cc (cgraph_edge::make_callback): Add missing call to
	duplication hooks.
	* ipa-prop.cc (init_callback_edge_summary): Remove function.
	(ipa_compute_jump_functions_for_edge): Remove call to
	init_callback_edge_summary, fix comment.
	(ipa_edge_args_sum_t::duplicate): Fix the initialization of jump
	functions vector for callback edges.

gcc/testsuite/ChangeLog:

	* c-c++-common/gomp/pr125121.c: New test.

Signed-off-by: Josef Melcr <josef.melcr@suse.com>
(cherry picked from commit 3bbe1a86ccecb180a4d32de6eab97bcc624a410f)
3 files changed