summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/ubsan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/ubsan.c b/commands/ubsan.c
index 620b4774c3..4a9716139c 100644
--- a/commands/ubsan.c
+++ b/commands/ubsan.c
@@ -102,6 +102,8 @@ static void test_ubsan_object_size_mismatch(void)
volatile long long *ptr, val2;
ptr = (long long *)&val;
+ OPTIMIZER_HIDE_VAR(ptr);
+
val2 = *ptr;
}