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

Re: [RFC] PR 12389


On Mon, 20 Oct 2003 16:43:36 +0200, Jan Hubicka <hubicka@ucw.cz> wrote:

> Currently both mainline and 3.3 fails on most of these.  With my patch I
> get one failure on the test checking extern inline function.
> This can be trivially fixed by disabling the outline_inline_function
> call in duplicate_decls.  In unit-at-a-time we never use the extern
> inline functions redefined by non-extern inline ones as we preserve just
> one body, so the debug info is even correct (not sure about the compiler
> behaviour but having one body for inlining and another for outlining is
> nasty)

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

> /* 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.

> /* 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".

Jason


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