Given the following C++ code:
struct vertex_type {
float x, y, z;
//vertex_type() {}
//vertex_type(float x, float y, float z) : x(x), y(y), z(z) {}
This is a long-standing missing optimization in GCC. It should be able to generate the same code for both cases, but it can't.
Without the constructors, your vertex_type
is a POD structure, which GCC can initialize static/global instances of at compile time. With the constructors, the best it can do is generate code to initialize the global at program startup.