[Bug c++/13057] [3.3/3.4 Regression] regparm attribute not applied to destructor
bryner at brianryner dot com
gcc-bugzilla@gcc.gnu.org
Sun Nov 16 02:22:00 GMT 2003
------- Additional Comments From bryner at brianryner dot com 2003-11-16 02:22 -------
I attempted to debug this today... I didn't quite figure out the problem but
maybe this will trigger someone's memory:
The regparm attribute is successfully parsed and attached to the destructor via
decl_attributes(). This calls build_type_attribute_variant() which clones the
node; the attributes are attached to the cloned node. This happens exactly the
same way for a destructor and a normal method.
When generating the assembly, init_cumulative_args() is called in i386.c which
checks the regparm attribute. For a normal method, the fntype parameter to this
method is the cloned node from build_type_attribute_variant, which has the
attribute(s) attached to it. For the destructor, however, fntype is neither the
node passed to decl_attributes nor the clone that was made. Whatever it is, it
has a null attributes pointer, so no parameters are passed in registers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13057
More information about the Gcc-bugs
mailing list