[Bug c/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 21 09:25:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> Won't that break with function-local statics? Those can certainly refer to
> other function-local static, with this patch gcc might think the other ones
> are unused. I mean something like:
>
> int **
> foo (void)
> {
> static int a = 0;
> static int *b = &a;
> static int **c = &b;
> return c;
> }
int **
foo (void)
{
static int a = 0;
static int *b = &a;
static int **c = &b;
return c;
}
int main()
{
return **foo();
}
I can still step into foo() and print a, b and c when compiling with
-O -fno-inline -g (I cannot seem to step into foo with inlining enabled,
but that doesn't work without the patch either - didn't expect that
because we cannot preserve DECL_INITIAL in the inlined blocks).
More information about the Gcc-bugs
mailing list