Skip to content

Commit ed2cadb

Browse files
committed
Fix check for arm32 so umul is used consistently on gcc and clang when building on arm64.
1 parent 3dea605 commit ed2cadb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

include/gtl/gtl_config.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,14 @@
116116
// Checks whether the __int128 compiler extension for a 128-bit
117117
// integral type is supported.
118118
// ------------------------------------------------------------
119+
#if defined(__arm__) && !defined(__aarch64__)
120+
#define GTL_ARM_32
121+
#endif
122+
119123
#ifdef GTL_HAVE_INTRINSIC_INT128
120124
#error GTL_HAVE_INTRINSIC_INT128 cannot be directly set
121125
#elif defined(__SIZEOF_INT128__)
122-
#if (defined(__clang__) && !defined(_WIN32) && !defined(__aarch64__)) || \
126+
#if (defined(__clang__) && !defined(_WIN32) && !defined(GTL_ARM_32)) || \
123127
(defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \
124128
(defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__))
125129
#define GTL_HAVE_INTRINSIC_INT128 1

tests/phmap/node_hash_set_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ TEST(THIS_TEST_NAME, Emplace) {
105105
gtl::THIS_HASH_SET<Thing> hs;
106106
hs.emplace(Thing(0, 1.25));
107107
hs.emplace(0, 1.3);
108-
assert(hs.find(Thing(0, 1.3)) != hs.end());
108+
EXPECT_TRUE(hs.find(Thing(0, 1.3)) != hs.end());
109109
}
110110

111111
} // namespace

0 commit comments

Comments
 (0)