Perhaps fundamental SSA problem with variable-size types
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Mon Jun 7 11:54:00 GMT 2004
Are those computations used to reserve heap or stack space?
They might have been, but not necessarily.
If so, they will not be dead.
They're not dead anyway.
We already handle something similar with C VLAs.
I'm trying those cases. When I try an array with a variable-size
element, it doesn't blow up, but does lose the fact that it's a nested
array reference, the loop optimizers won't work on it.
However, even the most trivial case of a VLA in a struct ICE's. For example:
int
sub1 (int i, char *pi)
{
typedef int foo[i];
struct bar {foo f1; int f2;} *p = (struct bar *) pi;
return p->f2;
}
So I'd say we *don't* handle it in C.
More information about the Gcc
mailing list