Re: [debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-04-10 Thread Aldy Hernandez
On 04/03/2015 07:41 AM, Jason Merrill wrote: On 03/18/2015 11:51 AM, Aldy Hernandez wrote: On 03/17/2015 07:12 PM, Jason Merrill wrote: Why are we outlining a DECL_EXTERNAL function? SRA has no restrictions on whether a function is DECL_EXTERNAL. Aha. So it seems that DECL_EXTERNAL is the

Re: [debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-04-03 Thread Jason Merrill
On 03/18/2015 11:51 AM, Aldy Hernandez wrote: On 03/17/2015 07:12 PM, Jason Merrill wrote: Why are we outlining a DECL_EXTERNAL function? SRA has no restrictions on whether a function is DECL_EXTERNAL. Aha. So it seems that DECL_EXTERNAL is the wrong gate for equate_decl_number_to_die here

Re: [debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-03-18 Thread Aldy Hernandez
On 03/17/2015 07:12 PM, Jason Merrill wrote: On 03/17/2015 03:58 PM, Aldy Hernandez wrote: The problem is that, for -fno-implicit-templates, the decl is now DECL_EXTERNAL, which means we never equate this new "DIE with DW_AT_specification" to the DECL. That is, we never fall through here: e

Re: [debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-03-17 Thread Jason Merrill
On 03/17/2015 03:58 PM, Aldy Hernandez wrote: The problem is that, for -fno-implicit-templates, the decl is now DECL_EXTERNAL, which means we never equate this new "DIE with DW_AT_specification" to the DECL. That is, we never fall through here: else if (!DECL_EXTERNAL (decl)) { H

[debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-03-17 Thread Aldy Hernandez
Hi Jason. I merged mainline into the debug-early branch and I ran into a problem compiling a libstdc++ file with -fno-implicit-templates. The attached patch is what I used to solve the problem but I wanted to run it by you, to make sure I'm not overlooking something silly, or worse...somethin