diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/module.cc | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/modules/concept-7_a.C | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/modules/concept-7_b.C | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 2c2f9a9..73971e7 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -4046,6 +4046,7 @@ node_template_info (tree decl, int &use) || TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == FIELD_DECL + || TREE_CODE (decl) == CONCEPT_DECL || TREE_CODE (decl) == TEMPLATE_DECL)) { use_tpl = DECL_USE_TEMPLATE (decl); diff --git a/gcc/testsuite/g++.dg/modules/concept-7_a.C b/gcc/testsuite/g++.dg/modules/concept-7_a.C new file mode 100644 index 0000000..a39b31b --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/concept-7_a.C @@ -0,0 +1,7 @@ +// PR c++/102963 +// { dg-additional-options "-fmodules-ts -fconcepts" } +// { dg-module-cmi pr102963 } + +export module pr102963; + +export template<class T> concept C = __is_same(T, int); diff --git a/gcc/testsuite/g++.dg/modules/concept-7_b.C b/gcc/testsuite/g++.dg/modules/concept-7_b.C new file mode 100644 index 0000000..1f81208 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/concept-7_b.C @@ -0,0 +1,7 @@ +// PR c++/102963 +// { dg-additional-options "-fmodules-ts -fconcepts" } + +import pr102963; + +static_assert(C<int>); +static_assert(C<void>); // { dg-error "static assert" } |