Skip to content

Commit

Permalink
Make oom-heap.c test work with newer GCC (#1210)
Browse files Browse the repository at this point in the history
New GCC versions can optimize the old version of the test to use
practically zero memory
  • Loading branch information
SvizelPritula authored Feb 11, 2024
1 parent 1e0df35 commit b77c87b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmstestsuite/code/oom-heap.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <stdio.h>
#include <stdlib.h>

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
Expand Down

0 comments on commit b77c87b

Please sign in to comment.