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: Fix PR c++/34715: always_inline with templates and not declared as always_inline but definition has it


Andrew Pinski wrote:

 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
 template decls' function decl.

 * g++.dg/ext/always_inline-1.C: New test.
 * g++.dg/ext/always_inline-2.C: New test.
 * g++.dg/ext/always_inline-3.C: New test.
 * g++.dg/ext/always_inline-4.C: New test.

AFAICT, new_result is being thrown away at this point. There is no need to update new_result with code like this:


+	      DECL_DISREGARD_INLINE_LIMITS (old_result)
+	        = DECL_DISREGARD_INLINE_LIMITS (new_result)
+	          = (DECL_DISREGARD_INLINE_LIMITS (new_result)
+	             || DECL_DISREGARD_INLINE_LIMITS (old_result));

Just use the |= idiom used elsewhere here. OK with that change.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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