From 1eea53dfef7c181187c6d1c8556740ae9c407cc4 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Fri, 22 Feb 2008 21:21:11 +0000 Subject: re PR c++/34715 (always_inline with templates and not declared as always_inline but definition has it) 2008-02-22 Andrew Pinski PR C++/34715 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for template decls' function decl. 2008-02-22 Andrew Pinski PR C++/34715 * 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. From-SVN: r132558 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/decl.c | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'gcc/cp') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 19c34ba..19709c1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-02-22 Andrew Pinski + + PR C++/34715 + * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for + template decls' function decl. + 2008-02-22 Paolo Carlini PR c++/35282 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7294930..82c55e0 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -1675,6 +1675,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) = DECL_INTERFACE_KNOWN (new_result); DECL_DECLARED_INLINE_P (old_result) = DECL_DECLARED_INLINE_P (new_result); + DECL_DISREGARD_INLINE_LIMITS (old_result) + |= DECL_DISREGARD_INLINE_LIMITS (new_result); + } else { @@ -1682,6 +1685,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) |= DECL_INLINE (new_result); DECL_DECLARED_INLINE_P (old_result) |= DECL_DECLARED_INLINE_P (new_result); + DECL_DISREGARD_INLINE_LIMITS (old_result) + |= DECL_DISREGARD_INLINE_LIMITS (new_result); check_redeclaration_exception_specification (newdecl, olddecl); } } -- cgit v1.1