[Bug c++/62306] [4.9/5 Regression?] Change in the comdat used for constructors
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 2 15:47:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62306
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You could e.g. implement the dtors as:
_Z...D0...:
set some hard reg to 0
tail call some function
_Z...D1...:
set some hard reg to 1
tail call some function
_Z...D2...:
set some hard reg to 2
tail call some function
and that function would just have a magic extra argument, if the same in
between all levels would not use it at all, otherwise could e.g. have if (extra
== 0) delete ...; at the end, etc.
My memory is fuzzy on it after all the years, but as the comdat names are part
of the ABI, I think the idea was to allow implementations to choose how to
implement it while staying interoperable.
So, if g++ 4.[569]/5 emit it in D5, I think that is how it was meant, and what
should be done.
More information about the Gcc-bugs
mailing list