http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56344
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2013-02-18 Summary|ICE for program with larger |ICE for program with very |automatic structs |large structs returned by | |value Ever Confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-18 11:09:32 UTC --- Confirmed. Returning a struct of size > 2^31 by value ICEs like the following: t.c: In function 'main': t.c:34:10: internal compiler error: Segmentation fault result = mulm(m1, m2); ^ 0xad765d crash_signal /space/rguenther/src/svn/trunk/gcc/toplev.c:332 0x6d405b store_one_arg /space/rguenther/src/svn/trunk/gcc/calls.c:4707 0x6ceba4 expand_call(tree_node*, rtx_def*, int) /space/rguenther/src/svn/trunk/gcc/calls.c:3042 0x7f3634 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**) /space/rguenther/src/svn/trunk/gcc/expr.c:10207 Program received signal SIGSEGV, Segmentation fault. 0x000000000065b81f in store_one_arg (arg=0x7fffffffaf20, argblock=0x7ffff5ac2560, flags=0, variable_size=0, reg_parm_stack_space=0) at /space/rguenther/src/svn/gcc-4_7-branch/gcc/calls.c:4675 4675 stack_usage_map[i] = 1; (gdb) p i $1 = -1990967296 my advice: don't do it ;) (it won't work at runtime anyway) I think the middle-end should sorry (), the frontends eventually warn (or reject if possible).