aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@qt.io>2020-02-27 16:15:44 +0100
committerFawzi Mohamed <fawzi.mohamed@qt.io>2020-02-27 16:08:09 +0000
commita670e203b1a78570ef969f893b470c68bed890a2 (patch)
tree846d171d2e842a5aca30503542a2be60562ada8e /tests/manual
parent956fd44c3e43ce2e86ebe7a9ae5b37419e96cde4 (diff)
Ensure that null dereference in test is not optimized away
Change-Id: Icf8eb894a8277353448f46b18d5d6614be1d2350 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/debugger/simple/simple_test_app.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index cda17dc97d..20734abede 100644
--- a/tests/manual/debugger/simple/simple_test_app.cpp
+++ b/tests/manual/debugger/simple/simple_test_app.cpp
@@ -2356,7 +2356,8 @@ namespace final {
// Continue.
return; // Comment out.
- *(int *)0 = a + b;
+ volatile int *ip = 0;
+ *(int *)ip = a + b;
}
void testEndlessRecursion(int i = 0)