From: Gabriel Dos Reis Date: Wed, 21 Jan 2004 05:52:28 +0000 (+0000) Subject: backport: re PR c++/13057 (regparm attribute not applied to destructor) X-Git-Tag: releases/gcc-3.3.3~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a262c9fc8a736931fbebaeeda2b78ac3d8f5fa41;p=thirdparty%2Fgcc.git 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 --- 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