c++: Fix nullptr deref [pr97460[
authorNathan Sidwell <nathan@acm.org>
Fri, 16 Oct 2020 17:22:16 +0000 (10:22 -0700)
committerNathan Sidwell <nathan@acm.org>
Fri, 16 Oct 2020 17:22:16 +0000 (10:22 -0700)
commitccb4f20cbee1756c464033bbdda2f27b6aa2a63f
tree141fbcac7c4ea07cb5499361bfab57e40a495b6d
parenta16da48bf19bb139e5461e5b5b7f072d5369b054
c++: Fix nullptr deref [pr97460[

My changes to friend handling meant that there are now cases where a
friend doesn't get a lang-specific object.  So we need to check there
is one before looking inside it.

PR c++/97460
gcc/cp/
* pt.c (push_template_decl): Check DECL_LANG_SPECIFIC in friend
case.
gcc/testsuite/
* g++.dg/template/pr97460.C: New.
gcc/cp/pt.c
gcc/testsuite/g++.dg/template/pr97460.C [new file with mode: 0644]