[Bug c++/57408] New: lambda, Variable length arrays, thread, internal compiler error: in expand_expr_real_1, at expr.c:9327
superbem at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat May 25 02:53:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57408
Bug ID: 57408
Summary: lambda, Variable length arrays, thread, internal
compiler error: in expand_expr_real_1, at expr.c:9327
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: superbem at gmail dot com
#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*)
}
More information about the Gcc-bugs
mailing list