#include <stdio.h>

// tested on gcc-4.9.3 on linux gentoo amd64
// warning: compiling this will eat gigabytes of ram really fast so keep
// your CTRL-C ready
// compile with --std=c++14

struct v2f {
	float x=0, y=0; // must be =0 to reproduce (probably works with other vals)
};

namespace {
	struct foo {
		// declaring the array like this somehow bypasses the fact that 
		// v2f cannot be initialized with {0}
		static const size_t max_objects = 0xFFFF;
		size_t num_objects; // this is not necessary, just wanted to check if it still did it when not accessing bars
		v2f bars[max_objects * 255]; // the larger this array is, the longer it hangs for and the more memory it uses
	};

	foo f{0}; // must be initialized with {0} to reproduce
}

int main() {
	printf("%ld\n", f.num_objects);
}
