This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR other/51174: handle architectures with no DECL_COMDAT_GROUP


On Wed, Nov 23, 2011 at 8:57 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Nov 23, 2011 at 07:47:46AM -0600, Aldy Hernandez wrote:
>> >>@@ -4198,7 +4198,7 @@ ipa_tm_create_version_alias (struct cgra
>> >> ? TREE_SYMBOL_REFERENCED (tm_name) = 1;
>> >>
>> >> ? /* Perform the same remapping to the comdat group. ?*/
>> >>- ?if (DECL_COMDAT (new_decl))
>> >>+ ?if (HAVE_COMDAT_GROUP&& ?DECL_COMDAT (new_decl))
>> >> ? ? DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
>> >>
>> >> ? new_node = cgraph_same_body_alias (NULL, new_decl, info->new_decl);
>
> Wouldn't it be better to test if (DECL_ONE_ONLY (new_decl))
> instead? ?That is actually test for non-NULL DECL_COMDAT_GROUP
> and is what e.g. cp/ uses as guards on tweaking DECL_COMDAT_GROUP.
>
> BTW, the formatting is wrong above, no space before && and two spaces after
> it.

That will work as well.

Which solution should be committed?

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]