From: Martin Liska Date: Tue, 11 Apr 2017 16:37:31 +0000 (+0200) Subject: Do not create a constprop clone for calls_comdat_local nodes (PR ipa/80212). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58928b3589e98d5db034d9700b12d15015c36346;p=gcc.git Do not create a constprop clone for calls_comdat_local nodes (PR ipa/80212). 2017-04-11 Martin Liska PR ipa/80212 * ipa-cp.c (determine_versionability): Handle calls_comdat_local flags. From-SVN: r246847 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa7471e707a..1536626851a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-04-11 Martin Liska + + PR ipa/80212 + * ipa-cp.c (determine_versionability): Handle calls_comdat_local + flags. + 2017-04-11 Martin Sebor PR middle-end/80364 diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 0b408149a88..fa3d5fd7548 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -614,6 +614,12 @@ determine_versionability (struct cgraph_node *node, decloned constructors, inlining is always better anyway. */ else if (node->comdat_local_p ()) reason = "comdat-local function"; + else if (node->calls_comdat_local) + { + /* TODO: call is versionable if we make sure that all + callers are inside of a comdat group. */ + reason = "calls comdat-local function"; + } if (reason && dump_file && !node->alias && !node->thunk.thunk_p) fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",