I'm struggling to understand why this happen, maybe it's a bug.
#include <thread>
#include <cstdio>
using namespace std;
int main(){
int y=2;
float fa[2][y]; // thread compile fine if y were 2 hardcoded instead
fa[0][0]=0.8;
fa[0][1]=1.8;
auto fx=[&](){
for(int c=0;c<2;c++){ // thread compile fine if c<2 were c<1 instead
printf("\n%f",fa[0][c]); // (1*) "internal compiler error: in expand_expr_real_1, at expr.c:9327"
}
};
fx(); // works fine everytime
thread(fx).join(); //error (1*)
}
Why it compile only if changing on how I commented it?
I'm using gcc 4.8.0 with winpthreads.