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: [trans-mem] PR47690: redirect recursive calls in a clone correctly


Hi Aldy,

On 02/15/2011 04:31 PM, Aldy Hernandez wrote:
Consider a sample where a transaction callable function has a recursive
call to itself:

int george;
void NewQueueNode()
{
          __transaction [[atomic]] { george=999; }
          NewQueueNode();
}

Currently, when we are transforming calls to their transactional clone
counterparts, we stop transforming once we reach the end of a
transaction.  Ultimately, this means that in the cloned function, the
recursive call to NewQueueNode() will have the edges redirected to the
clone, but the gimple_call_fndecl() in the clone will still be pointing
to the original function.  This causes cgraph verification to fail with
a "edge points to wrong declaration" ICE.

But in this case, why is NewQueueNode cloned?
It shouldn't because it is never called in a transaction and it is not a transaction safe function.


Patrick.


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