From b77c87b4d60fbe7df60dc5e03d2be632a25992fe Mon Sep 17 00:00:00 2001 From: Benjamin Swart <32597377+SvizelPritula@users.noreply.github.com> Date: Sun, 11 Feb 2024 19:50:01 +0100 Subject: [PATCH] Make oom-heap.c test work with newer GCC (#1210) New GCC versions can optimize the old version of the test to use practically zero memory --- cmstestsuite/code/oom-heap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmstestsuite/code/oom-heap.c b/cmstestsuite/code/oom-heap.c index fd3cbb2fa5..3300d17175 100644 --- a/cmstestsuite/code/oom-heap.c +++ b/cmstestsuite/code/oom-heap.c @@ -1,7 +1,9 @@ #include +#include + +int *big; int main() { - int *big; int i; big = malloc(128 * 1024 * 1024); // If we don't do this cycle, the compiler is smart enough not to