Example: provenance_tag_bits_via_uintptr_t_1.c

#include <assert.h>
#include <stdio.h>
#include <stdint.h>
int x=1;
int main() {
int *p = &x;
// cast &x to an integer
uintptr_t i = (uintptr_t) p;
// check the bottom two bits of an int* are not used
assert(_Alignof(int) >= 4);
assert((i & 3u) == 0u);
// construct an integer like &x with low-order bit set
i = i | 1u;
// cast back to a pointer
int *q = (int *) i; // does this have defined behaviour?
// cast to integer and mask out the low-order two bits
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
// cast back to a pointer
int *r = (int *) j;
// are r and p now equivalent?
*r = 11; // does this have defined behaviour?
_Bool b = (r==p); // is this true?
printf("x=%i *r=%i (r==p)=%s\n",x,*r,b?"true":"false");
}
[link to test in Cerberus and Compiler Explorer]

Experimental data (what does this mean?)

gcc-8.1-O0 x=11 *r=11 (r==p)=true
gcc-8.1-O2 x=11 *r=11 (r==p)=true
gcc-8.1-O3 x=11 *r=11 (r==p)=true
gcc-8.1-O2-no-strict-aliasing x=11 *r=11 (r==p)=true
gcc-8.1-O3-no-strict-aliasing x=11 *r=11 (r==p)=true
clang-6.0-O0 x=11 *r=11 (r==p)=true
clang-6.0-O2 x=11 *r=11 (r==p)=true
clang-6.0-O3 x=11 *r=11 (r==p)=true
clang-6.0-O2-no-strict-aliasing x=11 *r=11 (r==p)=true
clang-6.0-O3-no-strict-aliasing x=11 *r=11 (r==p)=true
clang-6.0-UBSAN x=11 *r=11 (r==p)=true
clang-6.0-ASAN x=11 *r=11 (r==p)=true
clang-6.0-MSAN x=11 *r=11 (r==p)=true
icc-19-O0 x=11 *r=11 (r==p)=true
icc-19-O2 x=11 *r=11 (r==p)=true
icc-19-O3 x=11 *r=11 (r==p)=true
icc-19-O2-no-strict-aliasing x=11 *r=11 (r==p)=true
icc-19-O3-no-strict-aliasing x=11 *r=11 (r==p)=true
cerberus-concrete BEGIN EXEC[0]
Defined {value: "Specified(0)", stdout: "x=11 *r=11 (r==p)=true\n", blocked: "false"}
END EXEC[0]
Time spent: 0.020901 seconds
cerberus-symbolic 
gcc-4.9-shadowprov x=11 *r=11 (r==p)=true
CHERI:MIPS-O0 x=11 *r=11 (r==p)=true
CHERI:MIPS-O2 x=11 *r=11 (r==p)=true
CHERI:MIPS-O2-no-strict-aliasing x=11 *r=11 (r==p)=true
CHERI:CHERI-O0-uintcap-addr-exact-equals provenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
x=11 *r=11 (r==p)=true
CHERI:CHERI-O2-uintcap-addr-exact-equals provenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
x=11 *r=11 (r==p)=true
CHERI:CHERI-O2-no-strict-aliasing-uintcap-addr-exact-equals provenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
x=11 *r=11 (r==p)=true
CHERI:CHERI-O0-uintcap-offset-exact-equals exit codes: compile 0 / execute -1 Terminated with signal 6: Abort trapprovenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
Assertion failed: ((i & 3u) == 0u), function main, file provenance_tag_bits_via_uintptr_t_1.c, line 11.
CHERI:CHERI-O2-uintcap-offset-exact-equals exit codes: compile 0 / execute -1 Terminated with signal 6: Abort trapprovenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
Assertion failed: ((i & 3u) == 0u), function main, file provenance_tag_bits_via_uintptr_t_1.c, line 11.
CHERI:CHERI-O2-no-strict-aliasing-uintcap-offset-exact-equals exit codes: compile 0 / execute -1 Terminated with signal 6: Abort trapprovenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
Assertion failed: ((i & 3u) == 0u), function main, file provenance_tag_bits_via_uintptr_t_1.c, line 11.
CHERI:CHERI-O0-uintcap-addr provenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
x=11 *r=11 (r==p)=true
CHERI:CHERI-O2-uintcap-addr provenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
x=11 *r=11 (r==p)=true
CHERI:CHERI-O2-no-strict-aliasing-uintcap-addr provenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
x=11 *r=11 (r==p)=true
CHERI:CHERI-O0-uintcap-offset exit codes: compile 0 / execute -1 Terminated with signal 6: Abort trapprovenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
Assertion failed: ((i & 3u) == 0u), function main, file provenance_tag_bits_via_uintptr_t_1.c, line 11.
CHERI:CHERI-O2-uintcap-offset exit codes: compile 0 / execute -1 Terminated with signal 6: Abort trapprovenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
Assertion failed: ((i & 3u) == 0u), function main, file provenance_tag_bits_via_uintptr_t_1.c, line 11.
CHERI:CHERI-O2-no-strict-aliasing-uintcap-offset exit codes: compile 0 / execute -1 Terminated with signal 6: Abort trapprovenance_tag_bits_via_uintptr_t_1.c:11:13: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
assert((i & 3u) == 0u);
~ ^ ~~
/Users/alex/cheri/output/sdk/sysroot128/usr/include/assert.h:56:21: note: expanded from macro 'assert'
#define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \
^
provenance_tag_bits_via_uintptr_t_1.c:17:32: warning: using bitwise and on capability types may give surprising results; if this is an alignment check use __builtin_{is_aligned,align_up,align_down}(); if you are operating on integer values only consider using size_t/vaddr_t; if you are attempting to store data in the low pointer bits use the cheri_{get,set,clear}_low_ptr_bits() macros. [-Wcheri-bitwise-operations]
uintptr_t j = ((uintptr_t)q) & ~((uintptr_t)3u);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
Assertion failed: ((i & 3u) == 0u), function main, file provenance_tag_bits_via_uintptr_t_1.c, line 11.
RV-Match exit codes: compile 0 / execute 1
ch2o provenance_tag_bits_via_uintptr_t_1.c:1:10: fatal error: assert.h: No such file or directory
#include <assert.h>
^~~~~~~~~~
compilation terminated.
compcert-3.2 x=11 *r=11 (r==p)=true
compcert-3.2-O x=11 *r=11 (r==p)=true
compcert-3.2-interp Time 0: calling main()
--[step_internal_function]-->
Time 1: in function main, statement
p = &x;
i = (unsigned int) p;
(void) (__alignof__(int) >= 4 ?
(void) 0 : ((void) printf(., ., ., .), abort()));
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()));
i = i | 1U;
q = (int *) i;
j = (unsigned int) q & ~((unsigned int) 3U);
r = (int *) j;
*r = 11;
b = r == p;
printf(__stringlit_7, x, *r, b ? __stringlit_6 : __stringlit_5);
return 0;
--[step_seq]-->
Time 2: in function main, statement
p = &x;
i = (unsigned int) p;
(void) (__alignof__(int) >= 4 ?
(void) 0 : ((void) printf(., ., ., .), abort()));
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()));
i = i | 1U;
q = (int *) i;
j = (unsigned int) q & ~((unsigned int) 3U);
r = (int *) j;
*r = 11;
b = r == p;
printf(__stringlit_7, x, *r, b ? __stringlit_6 : __stringlit_5);
--[step_seq]-->
Time 3: in function main, statement p = &x;
--[step_do_1]-->
Time 4: in function main, expression p = &x
--[red_var_local]-->
Time 5: in function main, expression <loc p> = &x
--[red_var_global]-->
Time 6: in function main, expression <loc p> = &<loc x>
--[red_addrof]-->
Time 7: in function main, expression <loc p> = <ptr x>
--[red_assign]-->
Time 8: in function main, expression <ptr x>
--[step_do_2]-->
Time 9: in function main, statement /*skip*/;
--[step_skip_seq]-->
Time 10: in function main, statement
i = (unsigned int) p;
(void) (__alignof__(int) >= 4 ?
(void) 0 : ((void) printf(., ., ., .), abort()));
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()));
i = i | 1U;
q = (int *) i;
j = (unsigned int) q & ~((unsigned int) 3U);
r = (int *) j;
*r = 11;
b = r == p;
printf(__stringlit_7, x, *r, b ? __stringlit_6 : __stringlit_5);
--[step_seq]-->
Time 11: in function main, statement i = (unsigned int) p;
--[step_do_1]-->
Time 12: in function main, expression i = (unsigned int) p
--[red_var_local]-->
Time 13: in function main, expression <loc i> = (unsigned int) p
--[red_var_local]-->
Time 14: in function main, expression <loc i> = (unsigned int) <loc p>
--[red_rvalof]-->
Time 15: in function main, expression <loc i> = (unsigned int) <ptr x>
--[red_cast]-->
Time 16: in function main, expression <loc i> = <ptr x>
--[red_assign]-->
Time 17: in function main, expression <ptr x>
--[step_do_2]-->
Time 18: in function main, statement /*skip*/;
--[step_skip_seq]-->
Time 19: in function main, statement
(void) (__alignof__(int) >= 4 ?
(void) 0 : ((void) printf(., ., ., .), abort()));
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()));
i = i | 1U;
q = (int *) i;
j = (unsigned int) q & ~((unsigned int) 3U);
r = (int *) j;
*r = 11;
b = r == p;
printf(__stringlit_7, x, *r, b ? __stringlit_6 : __stringlit_5);
--[step_seq]-->
Time 20: in function main, statement
(void) (__alignof__(int) >= 4 ?
(void) 0 : ((void) printf(., ., ., .), abort()));
--[step_do_1]-->
Time 21: in function main, expression
(void) (__alignof__(int) >= 4 ?
(void) 0 : ((void) printf(., ., ., .), abort()))
--[red_alignof]-->
Time 22: in function main, expression
(void) (4U >= 4 ? (void) 0 : ((void) printf(., ., ., .), abort()))
--[red_binop]-->
Time 23: in function main, expression
(void) (1 ? (void) 0 : ((void) printf(., ., ., .), abort()))
--[red_condition]-->
Time 24: in function main, expression (void) (void) (void) 0
--[red_cast]-->
Time 25: in function main, expression (void) (void) 0
--[red_paren]-->
Time 26: in function main, expression (void) 0
--[red_cast]-->
Time 27: in function main, expression 0
--[step_do_2]-->
Time 28: in function main, statement /*skip*/;
--[step_skip_seq]-->
Time 29: in function main, statement
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()));
i = i | 1U;
q = (int *) i;
j = (unsigned int) q & ~((unsigned int) 3U);
r = (int *) j;
*r = 11;
b = r == p;
printf(__stringlit_7, x, *r, b ? __stringlit_6 : __stringlit_5);
--[step_seq]-->
Time 30: in function main, statement
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()));
--[step_do_1]-->
Time 31: in function main, expression
(void) ((i & 3U) == 0U ? (void) 0 : ((void) printf(., ., ., .), abort()))
--[red_var_local]-->
Time 32: in function main, expression
(void) ((<loc i> & 3U) == 0U ?
(void) 0 : ((void) printf(., ., ., .), abort()))
--[red_rvalof]-->
Time 33: in function main, expression
(void) ((<ptr x> & 3U) == 0U ?
(void) 0 : ((void) printf(., ., ., .), abort()))
Stuck state: in function main, expression
(void) ((<ptr x> & 3U) == 0U ?
(void) 0
: ((void) printf(__stringlit_3, __stringlit_2, 11, __stringlit_4),
abort()))
Stuck subexpression: <ptr x> & 3U
ERROR: Undefined behavior
In file included from provenance_tag_bits_via_uintptr_t_1.c:1:
In file included from /usr/include/assert.h:42:
/usr/include/sys/cdefs.h:81:2: warning: "Unsupported compiler detected" [-W#warnings]
#warning "Unsupported compiler detected"
^
1 warning generated.