[trunk,vta] fix -g/-g0 codegen difference in cxx_dwarf_name()

Alexandre Oliva aoliva@redhat.com
Tue Jun 2 07:42:00 GMT 2009


The fix for PR c++/14912, about two months ago, brought about an
-fcompare-debug regression.  cxx_dwarf_name(), only called when emitting
debug information, may end up getting the then-added
count_non_default_template_args().

This function performs template substitution in default template
arguments, to compare them with the actual arguments.  This substitution
may create new decls, getting decl uids out of sync.

In the testcase I looked at, -fcomopare-debug failed just because the
final RTL dumps contained the names of D.<uid> decls, but out-of-sync
UIDs are known to cause actual codegen differences, from other
-fcompare-debug fixes, so I'd like to install this fix.

Ok for trunk?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-cp-dwarf-no-omit-default-template-args.patch
Type: text/x-patch
Size: 4298 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090602/40507d94/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Gcc-patches mailing list