diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-03-02 17:03:28 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-03-02 17:03:28 +0000 |
commit | d112e173ea093f55a16a14b26ef65088381ee09c (patch) | |
tree | 0e431eed743ba1cc0e82d88a7b3fcc79b66d8b1f /gcc/fortran/module.c | |
parent | 4c391563407aeba981f6a71423297f36d5ece0ee (diff) | |
download | gcc-d112e173ea093f55a16a14b26ef65088381ee09c.zip gcc-d112e173ea093f55a16a14b26ef65088381ee09c.tar.gz gcc-d112e173ea093f55a16a14b26ef65088381ee09c.tar.bz2 |
libstdc++: Fix std::lexicographic_compare for unsigned char (PR 93972)
The new 25_algorithms/lexicographical_compare/93972.cc test fails on
targets where char is unsigned, revealing an existing regression with
the std::__memcmp helper that had gone unnoticed in
std::lexicographical_compare. When comparing char and unsigned char, the
memcmp optimisation is enabled, but the new std::__memcmp function fails
to compile for mismatched types.
PR libstdc++/93972
* include/bits/stl_algobase.h (__memcmp): Allow pointer types to
differ.
* testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
Diffstat (limited to 'gcc/fortran/module.c')
0 files changed, 0 insertions, 0 deletions