------- Comment #11 from hubicka at gcc dot gnu dot org 2008-01-11 15:39 ------- The problem here is really how we handle extern inline functions redefining non-extern inline functions.
What forntend does is to handle all extern inline or extern functions of same name in all units as single functions. It always rewrite in place the declaration by last body seen. Within single unit we allow transition from extern inline with definition to non-extern inline deinition by resetting the node and disabling inline. This is already ugly and gets worse with IMA: here we transit from non-extern inline to inline killing the non-extern inline body before cgraph has chance to output it. This is simply wrong, since we must output it. If someone gets C frontend to handle extern inline functions by assigning them separate DECLs different in each source unit (ideally as static inline would get) and different from DECL of non-extern inline. I can add simple cgraph API to associate extern inline variant with the offline body for purposes of inlining. Then we can behave sanely: use extern inline body when inlining and non-extern inline body when outputting the offline function. Current scheme where all extern inline functions are disabled from inlining in IMA or where we ICE as now is simply nonsense. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31529