I either found a very weird bug, or I am doing something wrong.
I am using Visual Studio Code v1.62.3 with CMakeTools v1.9.2
Here's my project structure:
clab
│   CMakeLists.txt
│
└───src
        not_a_test.c
And contents of CMakeLists.txt:
cmake_minimum_required(VERSION 3.15)
project(clab)
add_executable(not_a_test src/not_a_test.c)
So here's the strange part. If the contents of not_a_test.c are
#include <stdio.h> 
#define MAX_ARR_SIZE 500
int main(void) {
    int mat[MAX_ARR_SIZE][MAX_ARR_SIZE];
    printf("Hello!\n");
    return 0;
}
But if I add one line
#include <stdio.h> 
#define MAX_ARR_SIZE 500
int main(void) {
    int mat[MAX_ARR_SIZE][MAX_ARR_SIZE];
    int mat2[MAX_ARR_SIZE][MAX_ARR_SIZE]; // this one
    printf("Hello!\n");
    return 0;
}
It suddenly stops working at all

Also, when compiled via ideone / GCC v8.3 it works fine again: https://ideone.com/Vvrnnn

So, what do you think happens here?


