diff options
author | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-03-26 14:40:06 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-03-26 14:40:06 +0000 |
commit | ecbb1530e317e8b405d29dead5b080fe2ef9f50c (patch) | |
tree | 999523995b74fc9b4bf531a6cabba421735f4b1b /gcc/testsuite/gdc.test | |
parent | 465b8e7f4ecb9af118419dbf14a43cb95e1d12dd (diff) | |
download | gcc-ecbb1530e317e8b405d29dead5b080fe2ef9f50c.zip gcc-ecbb1530e317e8b405d29dead5b080fe2ef9f50c.tar.gz gcc-ecbb1530e317e8b405d29dead5b080fe2ef9f50c.tar.bz2 |
d/dmd: Merge upstream dmd ab702e73e
Fixes memory leak in the front-end symbol mangler, and introduces
recognition and rejection of a few more C types and directives.
Reviewed-on: https://github.com/dlang/dmd/pull/9492
From-SVN: r269945
Diffstat (limited to 'gcc/testsuite/gdc.test')
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/cerrors.d | 15 | ||||
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/ctypes.d | 13 | ||||
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/widechars.d | 10 |
3 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/cerrors.d b/gcc/testsuite/gdc.test/fail_compilation/cerrors.d new file mode 100644 index 0000000..3d69d41 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/cerrors.d @@ -0,0 +1,15 @@ +/* REQUIRED_ARGS: -wi +TEST_OUTPUT: +--- +fail_compilation/cerrors.d(11): Error: C preprocessor directive `#if` is not supported, use `version` or `static if` +fail_compilation/cerrors.d(11): Error: declaration expected, not `#` +fail_compilation/cerrors.d(15): Warning: C preprocessor directive `#endif` is not supported +fail_compilation/cerrors.d(15): Error: declaration expected, not `#` +--- +*/ + +#if 1 + +void test(wchar_t u); + +#endif diff --git a/gcc/testsuite/gdc.test/fail_compilation/ctypes.d b/gcc/testsuite/gdc.test/fail_compilation/ctypes.d new file mode 100644 index 0000000..9f5ff18 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/ctypes.d @@ -0,0 +1,13 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/ctypes.d(11): Error: use `real` instead of `long double` +fail_compilation/ctypes.d(12): Error: use `long` for a 64 bit integer instead of `long long` +--- +*/ + +void test() +{ + long double r; + long long ll; +} diff --git a/gcc/testsuite/gdc.test/fail_compilation/widechars.d b/gcc/testsuite/gdc.test/fail_compilation/widechars.d new file mode 100644 index 0000000..ccfc47a --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/widechars.d @@ -0,0 +1,10 @@ + +/* +DISABLED: win32 win64 +TEST_OUTPUT: +--- +fail_compilation/widechars.d(10): Error: undefined identifier `wchar_t`, did you mean `dchar`? +--- +*/ + +wchar_t x; |