diff mbox

[pph] Fix binding_level's names_size streaming (issue4634071)

Message ID 20110623000256.02F5B1C0DAE@gchare.mtv.corp.google.com
State New
Headers show

Commit Message

Gab Charette June 23, 2011, 12:02 a.m. UTC
See previous message. This patch only adds the fix to the dg-bogus comment for the failing pph test.

2011-06-22  Gabriel Charette  <gchare@google.com>

	* gcc/cp/name-lookup.h (cp_binding_level): Removed unused
	member names_size. Update all users.


--
This patch is available for review at http://codereview.appspot.com/4634071

Comments

Gab Charette June 23, 2011, 12:05 a.m. UTC | #1
And it looks like this wasn't sent to anyone directly...
Adding back dnovillo and crowl (Diego I don't think Jason was ever
added to the original message...?)

Gab

On Wed, Jun 22, 2011 at 5:02 PM, Gabriel Charette <gchare@google.com> wrote:
>
> See previous message. This patch only adds the fix to the dg-bogus comment for the failing pph test.
>
> 2011-06-22  Gabriel Charette  <gchare@google.com>
>
>        * gcc/cp/name-lookup.h (cp_binding_level): Removed unused
>        member names_size. Update all users.
>
> diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
> index 54977ce..297c57e 100644
> --- a/gcc/cp/name-lookup.c
> +++ b/gcc/cp/name-lookup.c
> @@ -544,7 +544,6 @@ add_decl_to_level (tree decl, cxx_scope *b)
>         necessary.  */
>       TREE_CHAIN (decl) = b->names;
>       b->names = decl;
> -      b->names_size++;
>
>       /* If appropriate, add decl to separate list of statics.  We
>         include extern variables because they might turn out to be
> diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
> index 009b5d9..5f266eb 100644
> --- a/gcc/cp/name-lookup.h
> +++ b/gcc/cp/name-lookup.h
> @@ -191,9 +191,6 @@ struct GTY(()) cp_binding_level {
>        are wrapped in TREE_LISTs; the TREE_VALUE is the OVERLOAD.  */
>     tree names;
>
> -    /* Count of elements in names chain.  */
> -    size_t names_size;
> -
>     /* A chain of NAMESPACE_DECL nodes.  */
>     tree namespaces;
>
> diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
> index 0e8c6bf..a535cab 100644
> --- a/gcc/cp/pph-streamer-in.c
> +++ b/gcc/cp/pph-streamer-in.c
> @@ -442,7 +442,6 @@ pph_in_binding_level (pph_stream *stream)
>   ALLOC_AND_REGISTER (stream, ix, bl, ggc_alloc_cleared_cp_binding_level ());
>
>   bl->names = pph_in_chain (stream);
> -  bl->names_size = pph_in_uint (stream);
>   bl->namespaces = pph_in_chain (stream);
>
>   bl->static_decls = pph_in_tree_vec (stream);
> diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c
> index f219cef..7a6c516 100644
> --- a/gcc/cp/pph-streamer-out.c
> +++ b/gcc/cp/pph-streamer-out.c
> @@ -448,7 +448,6 @@ pph_out_binding_level (pph_stream *stream, struct cp_binding_level *bl,
>     return;
>
>   pph_out_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS);
> -  pph_out_uint (stream, bl->names_size);
>   pph_out_chain_filtered (stream, bl->namespaces, ref_p, NO_BUILTINS);
>
>   pph_out_tree_vec (stream, bl->static_decls, ref_p);
> diff --git a/gcc/testsuite/g++.dg/pph/x1template.cc b/gcc/testsuite/g++.dg/pph/x1template.cc
> index 5b1e980..cecefd7 100644
> --- a/gcc/testsuite/g++.dg/pph/x1template.cc
> +++ b/gcc/testsuite/g++.dg/pph/x1template.cc
> @@ -1,5 +1,5 @@
>  // { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
> -// { dg-bogus "x1template.h:18:13: internal compiler error: in resume_scope, at cp/name-lookup.c:1569" "" { xfail *-*-* } 0 }
> +// { dg-bogus "x1template.h:18:13: internal compiler error: in resume_scope, at cp/name-lookup.c:1568" "" { xfail *-*-* } 0 }
>  // { dg-prune-output "In file included from " }
>
>  #include "x1template.h"
>
> --
> This patch is available for review at http://codereview.appspot.com/4634071
Gabriel Dos Reis June 23, 2011, 12:17 a.m. UTC | #2
On Wed, Jun 22, 2011 at 7:05 PM, Gabriel Charette <gchare@google.com> wrote:
> And it looks like this wasn't sent to anyone directly...
> Adding back dnovillo and crowl (Diego I don't think Jason was ever
> added to the original message...?)

should not this go to mainline too?


-- Gaby
Diego Novillo June 23, 2011, 11:07 a.m. UTC | #3
On Wed, Jun 22, 2011 at 20:17, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:
> On Wed, Jun 22, 2011 at 7:05 PM, Gabriel Charette <gchare@google.com> wrote:
>> And it looks like this wasn't sent to anyone directly...
>> Adding back dnovillo and crowl (Diego I don't think Jason was ever
>> added to the original message...?)
>
> should not this go to mainline too?

Yes, I CC'd Jason in the original thread that started this discussion.
 Gab, could you send a patch for trunk?  Please CC Jason when you do.


Diego.
Gab Charette June 24, 2011, 5:35 p.m. UTC | #4
This was commited to trunk. Diego can you commit this patch to pph as well?

Thanks,
Gab

On Thu, Jun 23, 2011 at 4:07 AM, Diego Novillo <dnovillo@google.com> wrote:
> On Wed, Jun 22, 2011 at 20:17, Gabriel Dos Reis
> <gdr@integrable-solutions.net> wrote:
>> On Wed, Jun 22, 2011 at 7:05 PM, Gabriel Charette <gchare@google.com> wrote:
>>> And it looks like this wasn't sent to anyone directly...
>>> Adding back dnovillo and crowl (Diego I don't think Jason was ever
>>> added to the original message...?)
>>
>> should not this go to mainline too?
>
> Yes, I CC'd Jason in the original thread that started this discussion.
>  Gab, could you send a patch for trunk?  Please CC Jason when you do.
>
>
> Diego.
>
diff mbox

Patch

diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 54977ce..297c57e 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -544,7 +544,6 @@  add_decl_to_level (tree decl, cxx_scope *b)
 	 necessary.  */
       TREE_CHAIN (decl) = b->names;
       b->names = decl;
-      b->names_size++;
 
       /* If appropriate, add decl to separate list of statics.  We
 	 include extern variables because they might turn out to be
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index 009b5d9..5f266eb 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -191,9 +191,6 @@  struct GTY(()) cp_binding_level {
        are wrapped in TREE_LISTs; the TREE_VALUE is the OVERLOAD.  */
     tree names;
 
-    /* Count of elements in names chain.  */
-    size_t names_size;
-
     /* A chain of NAMESPACE_DECL nodes.  */
     tree namespaces;
 
diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
index 0e8c6bf..a535cab 100644
--- a/gcc/cp/pph-streamer-in.c
+++ b/gcc/cp/pph-streamer-in.c
@@ -442,7 +442,6 @@  pph_in_binding_level (pph_stream *stream)
   ALLOC_AND_REGISTER (stream, ix, bl, ggc_alloc_cleared_cp_binding_level ());
 
   bl->names = pph_in_chain (stream);
-  bl->names_size = pph_in_uint (stream);
   bl->namespaces = pph_in_chain (stream);
 
   bl->static_decls = pph_in_tree_vec (stream);
diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c
index f219cef..7a6c516 100644
--- a/gcc/cp/pph-streamer-out.c
+++ b/gcc/cp/pph-streamer-out.c
@@ -448,7 +448,6 @@  pph_out_binding_level (pph_stream *stream, struct cp_binding_level *bl,
     return;
 
   pph_out_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS);
-  pph_out_uint (stream, bl->names_size);
   pph_out_chain_filtered (stream, bl->namespaces, ref_p, NO_BUILTINS);
 
   pph_out_tree_vec (stream, bl->static_decls, ref_p);
diff --git a/gcc/testsuite/g++.dg/pph/x1template.cc b/gcc/testsuite/g++.dg/pph/x1template.cc
index 5b1e980..cecefd7 100644
--- a/gcc/testsuite/g++.dg/pph/x1template.cc
+++ b/gcc/testsuite/g++.dg/pph/x1template.cc
@@ -1,5 +1,5 @@ 
 // { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "x1template.h:18:13: internal compiler error: in resume_scope, at cp/name-lookup.c:1569" "" { xfail *-*-* } 0 }
+// { dg-bogus "x1template.h:18:13: internal compiler error: in resume_scope, at cp/name-lookup.c:1568" "" { xfail *-*-* } 0 }
 // { dg-prune-output "In file included from " }
 
 #include "x1template.h"