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: [PATCH] Fix PR debug/14114


> Yes, and this doesn't happen when the original decl is at file scope.
> i.e.
>
> extern foo();
>
> a() { extern foo(); }
> foo(); { ... }

Except that it does happen: the first 'extern foo();' is not sent to 
gen_subprogram_die but the second is.

> No, but I would rather you not try to bandage this deeply broken data
> structure, especially when I'm within 200 lines of code of replacing
> it.  Besides which, independent of whether c-decl is doing the right
> thing (it isn't), it seems wrong that dwarf2out.c barfs in this
> circumstance.

But dwarf2out.c should never see this case!  We were lucky enough that it 
helped us to spot the C front-end bug.

Note that the testcase doesn't fail if parsed by the C++ front-end.

-- 
Eric Botcazou


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