aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-03-12 13:29:16 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-03-12 13:29:16 +0000
commitc9634470ba8b918c01a7680740cf9ea13ca06967 (patch)
tree279986d79aff26484061e545bce82c387b8edb0a /gcc/testsuite/gdc.test
parentdf2a91dece0ac6e410e3cf48b39cba8c3744c5f3 (diff)
downloadgcc-c9634470ba8b918c01a7680740cf9ea13ca06967.zip
gcc-c9634470ba8b918c01a7680740cf9ea13ca06967.tar.gz
gcc-c9634470ba8b918c01a7680740cf9ea13ca06967.tar.bz2
d/dmd: Merge upstream dmd 7423993c9
Fixes C++ mangling for substituted basic types that are target-specific. Introduces a new method that currently does nothing, but could in future make use of flag_abi_version as extern(C++) integration improves in latter versions of the D front-end. Reviewed-on: https://github.com/dlang/dmd/pull/9439 gcc/d/ChangeLog: 2019-03-12 Iain Buclaw <ibuclaw@gdcproject.org> * d-lang.cc (d_init_options): Set global.params.cplusplus to C++14. * d-target.cc (Target::cppFundamentalType): New method. From-SVN: r269611
Diffstat (limited to 'gcc/testsuite/gdc.test')
-rw-r--r--gcc/testsuite/gdc.test/runnable/cppa.d5
-rw-r--r--gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/runnable/cppa.d b/gcc/testsuite/gdc.test/runnable/cppa.d
index 82b93ad..6b2bafb 100644
--- a/gcc/testsuite/gdc.test/runnable/cppa.d
+++ b/gcc/testsuite/gdc.test/runnable/cppa.d
@@ -619,6 +619,7 @@ else
alias c_long_double myld;
extern (C++) myld testld(myld);
+extern (C++) myld testldld(myld, myld);
void test15()
@@ -626,6 +627,10 @@ void test15()
myld ld = 5.0;
ld = testld(ld);
assert(ld == 6.0);
+
+ myld ld2 = 5.0;
+ ld2 = testldld(ld2, ld2);
+ assert(ld2 == 6.0);
}
/****************************************/
diff --git a/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp b/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp
index 7574c5f..587145c 100644
--- a/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp
+++ b/gcc/testsuite/gdc.test/runnable/extra-files/cppb.cpp
@@ -439,6 +439,12 @@ long double testld(long double ld)
return ld + 1;
}
+long double testldld(long double ld1, long double ld2)
+{
+ assert(ld1 == 5);
+ return ld2 + 1;
+}
+
long testl(long lng)
{
assert(lng == 5);