Honza, After we debugged this offline, I assume that you applied a version of the patch to trunk?
Thanks, David On Fri, May 13, 2011 at 3:14 PM, David Edelsohn <dje....@gmail.com> wrote: > Honza, > > Testing is not complete, but testcases that failed with DECL_ONE_ONLY > error now are passing with the later version of the patch you sent. > > - David > > On Fri, May 13, 2011 at 10:49 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >> Hi, >> please also try this patch >> >> Index: ipa.c >> =================================================================== >> --- ipa.c (revision 173723) >> +++ ipa.c (working copy) >> @@ -886,6 +886,9 @@ function_and_variable_visibility (bool w >> while (decl_node->thunk.thunk_p) >> decl_node = decl_node->callees->callee; >> >> + DECL_COMDAT_GROUP (node->decl) = DECL_COMDAT_GROUP >> (decl_node->decl); >> + DECL_COMDAT (node->decl) = DECL_COMDAT (decl_node->decl); >> + >> /* Thunks have the same visibility as function they are attached to. >> For some reason C++ frontend don't seem to care. I.e. in >> g++.dg/torture/pr41257-2.C the thunk is not comdat while function >> @@ -893,10 +896,8 @@ function_and_variable_visibility (bool w >> >> We also need to arrange the thunk into the same comdat group as >> the function it reffers to. */ >> - if (DECL_COMDAT (decl_node->decl)) >> + if (DECL_ONE_ONLY (decl_node->decl)) >> { >> - DECL_COMDAT (node->decl) = 1; >> - DECL_COMDAT_GROUP (node->decl) = DECL_COMDAT_GROUP >> (decl_node->decl); >> if (!node->same_comdat_group) >> { >> node->same_comdat_group = decl_node; >> >