]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix hash<__int128> test for x32 [PR121150]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 18 Jul 2025 08:55:13 +0000 (09:55 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 18 Jul 2025 09:29:58 +0000 (10:29 +0100)
commit6f5d89063d79c776c4d612b7240e54c53156cedd
tree256f5db97d8cb1c19985ac1ea44737cf309c45e5
parentbc3de0014aa91c43ec83d27c7f2a13a145f6d82b
libstdc++: Fix hash<__int128> test for x32 [PR121150]

I incorrectly assumed that all targets that support __int128 use the
LP64 ABI, so size_t is a 64-bit type. But x32 uses ILP32 and still
supports __int128 (because it's an ILP32 target on 64-bit hardware).

Add casts to the tests so that we get the correct expected values using
size_t type.

libstdc++-v3/ChangeLog:

PR libstdc++/121150
* testsuite/20_util/hash/int128.cc: Cast expected values to
size_t.
libstdc++-v3/testsuite/20_util/hash/int128.cc