aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2018-12-06 23:18:40 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2018-12-06 23:18:40 +0000
commitd7711adcd5226995063342631e1ce5c2ff055981 (patch)
treed18e6d7e133cf87e121f40a607230f110db42421 /gcc/fortran/trans-openmp.c
parent0d699def39bb937e3fddbd8149892594447b7f0d (diff)
downloadgcc-d7711adcd5226995063342631e1ce5c2ff055981.zip
gcc-d7711adcd5226995063342631e1ce5c2ff055981.tar.gz
gcc-d7711adcd5226995063342631e1ce5c2ff055981.tar.bz2
[PR86747] tsubst friend tpl ctxt before looking it up for dupes
When a member template is redeclared as a friend, we enter the context of the member before looking it up, and then we check that the decls are compatible. However, when the member template references template types of the enclosing context, say an enclosing template class, the compare fails because the friend decl is already tsubsted, whereas the looked up name isn't. The problem is that the enclosing context is taken from the friend declaration before tsubsting it, so we look up in the context of the generic template instead of that of the tsubsted one we're specializing. The solution is to tsubst the enclosing context when it's a non-namespace scope. for gcc/cp/ChangeLog PR c++/86747 * pt.c (tsubst_friend_class): Enter tsubsted class context. for gcc/testsuite/ChangeLog PR c++/86747 * g++.dg/pr86747.C: New. From-SVN: r266875
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
0 files changed, 0 insertions, 0 deletions