[GOOGLE] Check conditions before calling varpool_node

2013-05-09 Thread Carrot Wei
This patch fixed google bug entry 6124850. The usage of varpool_node has some restrictions on the corresponding var decl. In LIPO mode function notice_global_symbol may call varpool_node with a decl that doesn't satisfy these restrictions since the function notice_global_symbol can be directly or

Re: [GOOGLE] Check conditions before calling varpool_node

2013-05-09 Thread Xinliang David Li
This is not correct. current_module_id is used only in FE parsing. The real question is why the decl is created, neither static nor external? David On Thu, May 9, 2013 at 11:39 AM, Carrot Wei car...@google.com wrote: This patch fixed google bug entry 6124850. The usage of varpool_node has

Re: [GOOGLE] Check conditions before calling varpool_node

2013-05-09 Thread Carrot Wei
On Thu, May 9, 2013 at 12:53 PM, Xinliang David Li davi...@google.com wrote: This is not correct. current_module_id is used only in FE parsing. Suppose the var decl has correct flags and varpool_node can accept it, a new varpool_node will be created for it, the module_id for the new node is set

Re: [GOOGLE] Check conditions before calling varpool_node

2013-05-09 Thread Xinliang David Li
On Thu, May 9, 2013 at 4:46 PM, Carrot Wei car...@google.com wrote: On Thu, May 9, 2013 at 12:53 PM, Xinliang David Li davi...@google.com wrote: This is not correct. current_module_id is used only in FE parsing. Suppose the var decl has correct flags and varpool_node can accept it, a new