This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[unit-at-a-time] Java inlining woes
- From: Jeff Sturm <jsturm at one-point dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 21 Aug 2003 15:02:09 -0400 (EDT)
- Subject: [unit-at-a-time] Java inlining woes
Scenario: Function b is inlined into a, a is expanded before b.
Everything goes nicely until:
OSC.java:9: internal compiler error: in add_abstract_origin_attribute, at
dwarf2out.c:9878
Function a clones VAR_DECL's from b, setting abstract origin accordingly.
But the origin DIE doesn't exist yet, so when we gen_decl_die(a)...
kaboom.
This only happens in my patched tree, since without unit-at-a-time, the
function tree doesn't exist until just before it is expanded. And with
unit-at-a-time it is rare, since the inlined-from functions are generally
expanded first. (In my complete example, a calls b and b calls a.)
How does this work in other languages? I'm wondering about e.g. "extern
inline" where I'd guess the function is also not expanded before its body
is cloned.
Jeff