Message ID | 20110223191408.GX26625@codesourcery.com |
---|---|
State | New |
Headers | show |
On Wed, Feb 23, 2011 at 11:14:08AM -0800, Nathan Froyd wrote: > The patch below fixes PR 47786, a bit of DECL_CHAIN fallout. The patch > is trivial, even obvious, since it replaces the custom loop with > list_length. > > The only problem is adding a testcase. I can't add the existing > testcase from the PR to gcc.dg/lto/ because the bug isn't triggered when > compiling the files separately; the bug is only triggered when both > source files are specified on the command line to cc1 (*not* to > [x]gcc). AFAIK, there's no infrastructure for doing something like that > in the current testsuite. In the absence of comments and inspiration about what to do, I've committed this patch sans testcase. -Nathan
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index d696b5f..f029661 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -4035,7 +4035,7 @@ c_apply_type_quals_to_decl (int type_quals, tree decl) static hashval_t c_type_hash (const void *p) { - int i = 0; + int n_elements; int shift, size; const_tree const t = (const_tree) p;