[unit-at-a-time] Java inlining woes
Jeff Sturm
jsturm@one-point.com
Thu Aug 21 21:22:00 GMT 2003
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
More information about the Gcc
mailing list