aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-06-03 09:39:13 -0400
committerPatrick Palka <ppalka@redhat.com>2021-06-03 09:39:13 -0400
commitd999d9b7e53b9a9cd2004a19e84c637e5e5013f5 (patch)
tree2fa80535414e432aa07426d95410dc50a299af67 /gcc/tree-data-ref.c
parent69f517ac20566a645ff41a9bfca535822205a538 (diff)
downloadgcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5.zip
gcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5.tar.gz
gcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5.tar.bz2
c++: cv-qualified dependent name of alias tmpl [PR100592]
Here, the dependent template name in the return type of f() resolves to an alias of int& after substitution, and we end up complaining about qualifying this reference type with 'const' from cp_build_qualified_type rather than just silently dropping the qualification as per [dcl.ref]/1. The problem is ultimately that make_typename_type ignores the tf_keep_type_decl flag when the dependent name is a template-id. This in turn causes the TYPE_DECL check within tsubst <case TYPENAME_TYPE> to fail, and so we end up not passing tf_ignore_bad_quals to cp_build_qualified_type. This patch fixes this by making make_typename_type respect the tf_keep_type_decl flag in this situation. PR c++/100592 gcc/cp/ChangeLog: * decl.c (make_typename_type): After calling lookup_template_class, adjust the result to its TYPE_NAME and then consider the tf_keep_type_decl flag. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/alias-decl-71.C: New test.
Diffstat (limited to 'gcc/tree-data-ref.c')
0 files changed, 0 insertions, 0 deletions