On 9/22/22 14:25, Patrick Palka wrote:
index 80467c19254..722b64793ed 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -18235,9 +18235,11 @@ maybe_register_incomplete_var (tree var)
{
/* When the outermost open class is complete we can resolve any
pointers-to-members. */
- tree context = outermost_open_class ();
- incomplete_var iv = {var, context};
- vec_safe_push (incomplete_vars, iv);
+ if (tree context = outermost_open_class ())
+ {
+ incomplete_var iv = {var, context};
+ vec_safe_push (incomplete_vars, iv);
+ }
My immediate thought here is eek! during stream in, the
outermost_open_class could be anything -- to do with the context that
wanted to lookup of the thing being streamed in, right? So, the above
change is I think just papering over a problem in this case.
not sure how to approach this.
nathan
--
Nathan Sidwell