[Bug middle-end/86715] New: ICE passing too large argument on stack
zhonghao at pku dot org.cn
gcc-bugzilla@gcc.gnu.org
Sun Jul 29 01:17:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86715
Bug ID: 86715
Summary: ICE passing too large argument on stack
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
The code is as follow:
#define COLS 24000L
struct Matrix {
float data[COLS * COLS];
};
float mulv(float A[], float B[], int i, int j)
{
float result = 0.0;
{ int k; for (k = 0; k < COLS; ++k)
result += A[i*COLS + k] * B[j + k*COLS];
}
return result;
}
struct Matrix mulm(struct Matrix A, struct Matrix B)
{
struct Matrix result;
#define IJ(M) (M[i*COLS + j])
{ int i, j; for (i = 0; i < COLS; ++i)
for (j = 0; j < COLS; ++j)
IJ(result.data) = mulv(A.data, B.data, i, j);
}
return result;
}
int main(int argc, char* argv[])
{
struct Matrix m1, m2, result;
result = mulm(m1, m2);
return result.data[argc];
}
The error messages of gcc are as follows:
2sameartificialtestprogramhopefullytextplain.cpp: In function 'int main(int,
char**)':
2sameartificialtestprogramhopefullytextplain.cpp:34:23: sorry, unimplemented:
passing too large argument on stack
result = mulm(m1, m2);
^
2sameartificialtestprogramhopefullytextplain.cpp:34:23: sorry, unimplemented:
passing too large argument on stack
during RTL pass: expand
2sameartificialtestprogramhopefullytextplain.cpp:34:23: internal compiler
error: in expand_call, at calls.c:4591
0x6d26bd expand_call(tree_node*, rtx_def*, int)
../../gcc9.0/gcc/calls.c:4588
0xbdfefe expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc9.0/gcc/expr.c:10914
0xbec31f store_expr(tree_node*, rtx_def*, int, bool, bool)
../../gcc9.0/gcc/expr.c:5614
0xbed74b expand_assignment(tree_node*, tree_node*, bool)
../../gcc9.0/gcc/expr.c:5398
0xadb8e4 expand_call_stmt
../../gcc9.0/gcc/cfgexpand.c:2685
0xadb8e4 expand_gimple_stmt_1
../../gcc9.0/gcc/cfgexpand.c:3575
0xadb8e4 expand_gimple_stmt
../../gcc9.0/gcc/cfgexpand.c:3734
0xadcc4f expand_gimple_basic_block
../../gcc9.0/gcc/cfgexpand.c:5769
0xae1837 execute
../../gcc9.0/gcc/cfgexpand.c:6372
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
My gcc is 9.0.0
More information about the Gcc-bugs
mailing list