From 61591f059e5a2c4b99b23a08b9f3fb48ec2ccee6 Mon Sep 17 00:00:00 2001 From: Benjamin Swart Date: Thu, 30 Jun 2022 18:30:08 +0200 Subject: [PATCH] Make oom-heap.c test work with newer GCC 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