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

[3.4, C++] PR 14950

after all this problem is not that dificult to fix.  C++ frontend manages to
instantiate template before emmiting it but it mistakely keeps
TI_PENDING_TEMPLATE_FLAG on that makes C++ frontend to think that it should
prohibit inlining here.

Clearing the flag slightly easier appears to do the trick.

Bootstrapped/regtested ia64-linux

OK? (I would like to install it into mainline too even tought the testcase does
not reproduce there as this interference might hit us in other scenario too)

  template <class T> inline void Foo(T) __attribute__((always_inline));
  template <class T> inline void Foo(T) {}
  int main() 
     int i; 

2004-06-17  Jan Hubicka  <>
	* pt.c (instantiate_decl): Clean TI_PENDING_TEMPLATE_FLAG before
	expanding the function.
Index: cp/pt.c
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.816.2.31
diff -c -3 -p -r1.816.2.31 pt.c
*** cp/pt.c	10 Jun 2004 18:30:57 -0000	1.816.2.31
--- cp/pt.c	17 Jun 2004 18:06:55 -0000
*************** instantiate_decl (tree d, int defer_ok)
*** 11241,11246 ****
--- 11241,11249 ----
        /* Finish the function.  */
        d = finish_function (0);
+       /* Clear the flag now right now so we won't end up thinking that this
+          function is uninlinable.  */
        expand_or_defer_fn (d);

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