c++/modules: Add testcase for fixed issue with usings [PR115798]
This issue was fixed by r15-2003-gd6bf4b1c932211, but seems worth adding to the testsuite. PR c++/115798 gcc/testsuite/ChangeLog: * g++.dg/modules/using-26_a.C: New test. * g++.dg/modules/using-26_b.C: New test. * g++.dg/modules/using-26_c.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
This commit is contained in:
parent
1f7a21c6e8
commit
13757e50ff
3 changed files with 34 additions and 0 deletions
15
gcc/testsuite/g++.dg/modules/using-26_a.C
Normal file
15
gcc/testsuite/g++.dg/modules/using-26_a.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// PR c++/115798
|
||||
// { dg-additional-options "-fmodules-ts" }
|
||||
// { dg-module-cmi base }
|
||||
|
||||
module;
|
||||
#include <cstdint>
|
||||
export module base;
|
||||
|
||||
export {
|
||||
using ::int8_t;
|
||||
}
|
||||
|
||||
export namespace std {
|
||||
using std::int8_t;
|
||||
}
|
10
gcc/testsuite/g++.dg/modules/using-26_b.C
Normal file
10
gcc/testsuite/g++.dg/modules/using-26_b.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// PR c++/115798
|
||||
// { dg-additional-options "-fmodules-ts" }
|
||||
// { dg-module-cmi xstd }
|
||||
|
||||
export module xstd;
|
||||
import base;
|
||||
|
||||
export namespace std {
|
||||
using std::int8_t;
|
||||
}
|
9
gcc/testsuite/g++.dg/modules/using-26_c.C
Normal file
9
gcc/testsuite/g++.dg/modules/using-26_c.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// PR c++/115798
|
||||
// { dg-additional-options "-fmodules-ts" }
|
||||
|
||||
import xstd;
|
||||
import base;
|
||||
|
||||
int main() {
|
||||
static_assert(__is_same(int8_t, std::int8_t));
|
||||
}
|
Loading…
Add table
Reference in a new issue