[RFC] PR 12389

Jan Hubicka hubicka@ucw.cz
Mon Oct 20 16:07:00 GMT 2003


> 
> The intent has certainly been that the inline version is used when inlining
> and the other is used for the out-of-line copy.  If you can't support that,

We never actaully did this.  WHehter we use old or new version depends
on when the callee is compled.
I tend to believe that the typical use for this is to define the
functions in separate file that does not use them, so this won't
break.

> I'm not sure what the best compromise is.  The out-of-line redefinition may
> not be suitable for inlining.  The conservative choice would be to suppress
> inlining of such a function.
> 
> It might work to treat the two as different functions within the compiler.

Yes, it is however quite a lot of work.
Perhaps surpressing inlining is easiest thing to do.  I will send
separate patch for that.
> 
> > /* Verify that inline function never actually inlined has no abstract DIE.  */
> > /* { dg-do compile */
> > /* { dg-options "-O2 -gdwarf2 -dA" } */
> > /* { dg-final { scan-assembler-not "DW_AT_inline" } } */
> > inline int t()
> > {
> > }
> > int (*q)()=t;
> 
> Yes, though I'm not sure we actually want to test most of these things; we
> might change our minds about what the right behavior is.

I think it would be usefull to keep these tests around just to ensure
that we don't output abstract DIEs when they are not referenced at all.
Or is tehre some good reason to do so?
> 
> > /* Verify that inline function never actually emit has no DIE.  */
> > /* { dg-do compile */
> > /* { dg-options "-O0 -gdwarf2 -dA" } */
> > /* { dg-final { scan-assembler-not "CIE Version" } } */
> > static inline int t()
> > {
> > }
> 
> "CIE Version" has nothing to do with the DIE; it's the per-file header for
> the .debug_frame section.  You probably want to check for "DW_TAG_subprogram".
OK,
there should be no dwarf debug output at all, so I choose random string
:)
Honza
> 
> Jason



More information about the Gcc-patches mailing list