This is the mail archive of the gcc-bugs@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]

[Bug middle-end/31529] [4.3 Regression] ICE in cgraph_expand_function with IMA



------- 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


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