aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2021-09-24 10:59:47 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2021-09-30 15:07:19 +0200
commitd46a29d919058fb383d19fe35c234fab58286f71 (patch)
treea70c30e956607308dbc72391acd191c006cd994a /gcc/testsuite/gdc.dg
parentef37ddf477ac4b21ec4d1be9260cfd3b431fd4a9 (diff)
downloadgcc-d46a29d919058fb383d19fe35c234fab58286f71.zip
gcc-d46a29d919058fb383d19fe35c234fab58286f71.tar.gz
gcc-d46a29d919058fb383d19fe35c234fab58286f71.tar.bz2
libphobos: Define main function as extern(C) when compiling without D runtime (PR102476)
The default supplied main function as read when compiling with `-fmain' has extern(D) linkage. However this does not work when mixing this option together with `-fno-druntime'. PR d/102476 gcc/testsuite/ChangeLog: * gdc.dg/pr102476.d: New test. libphobos/ChangeLog: * libdruntime/__main.di: Define main function as extern(C) when compiling without D runtime.
Diffstat (limited to 'gcc/testsuite/gdc.dg')
-rw-r--r--gcc/testsuite/gdc.dg/pr102476.d3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.dg/pr102476.d b/gcc/testsuite/gdc.dg/pr102476.d
new file mode 100644
index 0000000..543716e
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr102476.d
@@ -0,0 +1,3 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102476
+// { dg-do link }
+// { dg-options "-fmain -fno-druntime" }