[Bug middle-end/59711] ICE in force_constant_size, at gimplify.c:619 with variably-modified return type
fweimer at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 8 12:14:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59711
--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
Created attachment 31772
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31772&action=edit
pr59711.adb
Here's the same thing in Ada (where it actually works—it's actually fairly
idiomatic code, I believe). The generated GIMPLE looks like this (with GCC
4.8.2 from Fedora):
PR59711 (const natural___XDLU_0__2147483647 n)
{
integer n.3;
sizetype D.2600;
bitsizetype D.2601;
bitsizetype D.2602;
struct pr59711__s * R.4;
character D.2604;
void * saved_stack.5;
natural___XDLU_0__2147483647 pr59711__s__T1b___U;
typedef pr59711__s__T1b___XDL_1 pr59711__s__T1b___XDL_1;
typedef signed long struct signed long;
typedef character pr59711__s__T2b[1:D.2600];
typedef struct pr59711__s pr59711__s;
struct pr59711__s R.0 [value-expr: *R.4];
saved_stack.5 = .builtin_stack_save ();
try
{
pr59711__s__T1b___U = n;
n.3 = (integer) n;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
D.2601 = (bitsizetype) D.2600;
D.2602 = D.2601 * 8;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
D.2601 = (bitsizetype) D.2600;
D.2602 = D.2601 * 8;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
D.2601 = (bitsizetype) D.2600;
D.2602 = D.2601 * 8;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
D.2601 = (bitsizetype) D.2600;
D.2602 = D.2601 * 8;
n.3 = (integer) n;
D.2600 = (sizetype) n.3;
R.4 = .builtin_alloca_with_align (D.2600, 8);
*R.4 = pr59711.f (); [return slot optimization]
D.2604 = R.4->a[1]{lb: 1 sz: 1};
return D.2604;
}
finally
{
.builtin_stack_restore (saved_stack.5);
}
}
More information about the Gcc-bugs
mailing list