diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-06-12 20:05:05 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-06-12 20:05:05 -0400 |
commit | b1fe718cbe0c8883af89f52e0aad3ebf913683de (patch) | |
tree | edab9c1f24a6841e1c1f7bd8472dabe38534257a /gcc/testsuite/g++.dg | |
parent | 5288935d30c4615cce664ca8fba65eecf05c326f (diff) | |
download | gcc-b1fe718cbe0c8883af89f52e0aad3ebf913683de.zip gcc-b1fe718cbe0c8883af89f52e0aad3ebf913683de.tar.gz gcc-b1fe718cbe0c8883af89f52e0aad3ebf913683de.tar.bz2 |
c++: visibility wrt concept-id as targ [PR115283]
Like with alias templates, it seems we don't maintain visibility flags
for concepts either, so min_vis_expr_r should ignore them for now.
Otherwise after r14-6789 we may incorrectly give a function template that
uses a concept-id in its signature internal linkage.
PR c++/115283
gcc/cp/ChangeLog:
* decl2.cc (min_vis_expr_r) <case TEMPLATE_DECL>: Ignore
concepts.
gcc/testsuite/ChangeLog:
* g++.dg/template/linkage5.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/template/linkage5.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/linkage5.C b/gcc/testsuite/g++.dg/template/linkage5.C new file mode 100644 index 0000000..7e8f93f --- /dev/null +++ b/gcc/testsuite/g++.dg/template/linkage5.C @@ -0,0 +1,14 @@ +// PR c++/115283 +// { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z1fIiEv1AIX1CIT_EEE" } } +// { dg-do compile { target c++20 } } + +template<class T> +concept C = true; + +template<bool B> +struct A { }; + +template<class T> +void f(A<C<T>>) { } + +template void f<int>(A<true>); |