[Bug libstdc++/103240] std::type_info::before gives wrong answer for ARM EABI

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 23 21:17:56 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103240

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:ec6ba81a038be488cec5e3bdc4f30b7876d9c5ea

commit r11-9270-gec6ba81a038be488cec5e3bdc4f30b7876d9c5ea
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 16 21:03:21 2021 +0000

    libstdc++: Fix std::type_info::before for ARM [PR103240]

    The r179236 fix for std::type_info::operator== should also have been
    applied to std::type_info::before. Otherwise two distinct types can
    compare equivalent due to using a string comparison, when they should do
    a pointer comparison.

    libstdc++-v3/ChangeLog:

            PR libstdc++/103240
            * libsupc++/tinfo2.cc (type_info::before): Use unadjusted name
            to check for the '*' prefix.
            * testsuite/util/testsuite_shared.cc: Add type_info object for
            use in new test.
            * testsuite/18_support/type_info/103240.cc: New test.

    (cherry picked from commit 054bf99841aad3869c70643b2ba2d9f85770c980)


More information about the Gcc-bugs mailing list