Skip to content

Commit 72a3a3e

Browse files
tbaederrDrSergei
authored andcommitted
[clang][bytecode] Only use int128 if it is available
This broke a number of buildbots, e.g. https://lab.llvm.org/buildbot/#/builders/64/builds/4410
1 parent 1afbbbe commit 72a3a3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/test/AST/ByteCode/intap.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ static_assert(DivA / DivB == 2, "");
4848
constexpr _BitInt(4) DivC = DivA / 0; // both-error {{must be initialized by a constant expression}} \
4949
// both-note {{division by zero}}
5050

51+
#ifdef __SIZEOF_INT128__
5152
constexpr __int128 isMinDiv() {
5253
return __int128{0} / __int128{-1};
5354
}
5455
static_assert(isMinDiv() == 0, "");
55-
56+
#endif
5657

5758

5859
constexpr _BitInt(7) RemA = 47;

0 commit comments

Comments
 (0)