From ecbb1530e317e8b405d29dead5b080fe2ef9f50c Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 26 Mar 2019 14:40:06 +0000 Subject: 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 --- gcc/testsuite/gdc.test/fail_compilation/cerrors.d | 15 +++++++++++++++ gcc/testsuite/gdc.test/fail_compilation/ctypes.d | 13 +++++++++++++ gcc/testsuite/gdc.test/fail_compilation/widechars.d | 10 ++++++++++ 3 files changed, 38 insertions(+) create mode 100644 gcc/testsuite/gdc.test/fail_compilation/cerrors.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/ctypes.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/widechars.d (limited to 'gcc/testsuite/gdc.test') 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; -- cgit v1.1