------- Comment #3 from rguenth at gcc dot gnu dot org 2010-04-01 13:39 ------- The issue seems to be the C++ frontend marking inline functions needed at cp/semantics.c:3452 while the middle-end should already take care of that in cgraph_decide_is_function_needed.
Somehow that confuses us and we end up performing inlining on a body that has been reclaimed. Honza? The following "fixes" it, bug arguably the bug must then be latent with dllexport. Index: cp/semantics.c =================================================================== --- cp/semantics.c (revision 157906) +++ cp/semantics.c (working copy) @@ -3449,8 +3449,7 @@ expand_or_defer_fn_1 (tree fn) this function as needed so that finish_file will make sure to output it later. Similarly, all dllexport'd functions must be emitted; there may be callers in other DLLs. */ - if ((flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn)) - || lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn))) + if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn))) mark_needed (fn); } -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot | |org, hubicka at gcc dot gnu | |dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-04-01 13:39:09 date| | Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43611