We weren't reading in shadowed labels properly. The local variable *sl also turned out to be useless, the compiler just didn't mention it until now as it was "used" by the bad VEC_iterate call.
This doesn't fix any currently exposed pph bugs, but does help with me with the patch I'm currently writting. This was tested with a bootstrap build and pph regression testing. 2011-06-14 Gabriel Charette <gch...@google.com> * pph-streamer-in.c (pph_in_binding_level): Fix read of shadowed_labels. (pph_in_binding_level): Removed *sl. Index: pph-streamer-in.c =================================================================== --- pph-streamer-in.c (revision 174998) +++ pph-streamer-in.c (working copy) @@ -427,7 +427,6 @@ pph_in_binding_level (pph_stream *stream) { unsigned i, num, ix; - cp_label_binding *sl; struct cp_binding_level *bl; struct bitpack_d bp; enum pph_record_marker marker; @@ -461,7 +460,7 @@ num = pph_in_uint (stream); bl->shadowed_labels = NULL; - for (i = 0; VEC_iterate (cp_label_binding, bl->shadowed_labels, i, sl); i++) + for (i = 0; i < num; i++) { cp_label_binding *sl = pph_in_label_binding (stream); VEC_safe_push (cp_label_binding, gc, bl->shadowed_labels, sl); -- This patch is available for review at http://codereview.appspot.com/4589054