From a262c9fc8a736931fbebaeeda2b78ac3d8f5fa41 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Wed, 21 Jan 2004 05:52:28 +0000 Subject: [PATCH] backport: re PR c++/13057 (regparm attribute not applied to destructor) Backport from mainline 2004-01-05 Mark Mitchell PR c++/13057 * class.c (build_clone): Copy type attributes from the original function to the clone. From-SVN: r76258 --- gcc/cp/ChangeLog | 9 +++++++++ gcc/cp/class.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2d0c3261a6bd..c383f1cb3c82 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2004-01-21 Gabriel Dos Reis + + Backport from mainline + 2004-01-05 Mark Mitchell + + PR c++/13057 + * class.c (build_clone): Copy type attributes from the original + function to the clone. + 2004-01-21 Gabriel Dos Reis Backport from mainline diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 7640ad8047c9..3546743f215c 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4103,6 +4103,9 @@ build_clone (fn, name) if (exceptions) TREE_TYPE (clone) = build_exception_variant (TREE_TYPE (clone), exceptions); + TREE_TYPE (clone) + = build_type_attribute_variant (TREE_TYPE (clone), + TYPE_ATTRIBUTES (TREE_TYPE (fn))); } /* Copy the function parameters. But, DECL_ARGUMENTS on a TEMPLATE_DECL -- 2.47.2