memory: consider undef pointers as unaligned
MODIFY
ir/memory.cpp
ir/memory.cpp
@@ -552,6 +552,9 @@ expr Pointer::is_aligned(unsigned align) const {
if (align == 1)
return true;
+ if (isUndef(get_offset()))
+ return false;
+
auto bits = min(ilog2(align), bits_for_offset);
if (!observes_addresses())

MODIFY
tests/alive-tv/memory/punning-ptrint.src.ll
tests/alive-tv/memory/punning-ptrint.src.ll
+; TEST-ARGS: -smt-to=5000
+
define i8 @ptr_int_punning(i8** %pptr, i64 %n) {
%ptr = alloca i8
store i8* %ptr, i8** %pptr

memory: consider undef pointers as unaligned