aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2025-04-13 00:48:45 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2025-04-13 01:12:23 +0200
commit424c6c88038ef13364e6e7e74e2389923d95396e (patch)
tree8870674783ca938ec484e0c7bcaa6919ffba3b99 /gcc
parent9a7b6668f8f79be8fa73982b8b0bde33c1d8c61f (diff)
downloadgcc-424c6c88038ef13364e6e7e74e2389923d95396e.zip
gcc-424c6c88038ef13364e6e7e74e2389923d95396e.tar.gz
gcc-424c6c88038ef13364e6e7e74e2389923d95396e.tar.bz2
d: Fix importC cannot find input file __importc_builtins.d [PR119761]
Synchronizes the D runtime library with upstream druntime 09ed02ce56, and fixes a rename of the importC module missed in the r15-6559 merge. PR d/119761 libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 09ed02ce56. * libdruntime/Makefile.am (DRUNTIME_DISOURCES): Rename __builtins.di to __importc_builtins.di. * libdruntime/Makefile.in: Regenerate. * libdruntime/__builtins.di: Move to... * libdruntime/__importc_builtins.di: ...here. gcc/testsuite/ChangeLog: * gdc.dg/import-c/import-c.exp: New test. * gdc.dg/import-c/pr119761.d: New test. * gdc.dg/import-c/pr119761c.c: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gdc.dg/import-c/import-c.exp29
-rw-r--r--gcc/testsuite/gdc.dg/import-c/pr119761.d2
-rw-r--r--gcc/testsuite/gdc.dg/import-c/pr119761c.c4
3 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.dg/import-c/import-c.exp b/gcc/testsuite/gdc.dg/import-c/import-c.exp
new file mode 100644
index 0000000..53d1478
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/import-c/import-c.exp
@@ -0,0 +1,29 @@
+# Copyright (C) 2025 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Load support procs.
+load_lib gdc-dg.exp
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+gdc-dg-runtest [lsort \
+ [glob -nocomplain $srcdir/$subdir/*.d ] ] "" \
+ "-I $srcdir/$subdir -finclude-imports"
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gdc.dg/import-c/pr119761.d b/gcc/testsuite/gdc.dg/import-c/pr119761.d
new file mode 100644
index 0000000..20eff31
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/import-c/pr119761.d
@@ -0,0 +1,2 @@
+// { dg-do compile }
+import pr119761c;
diff --git a/gcc/testsuite/gdc.dg/import-c/pr119761c.c b/gcc/testsuite/gdc.dg/import-c/pr119761c.c
new file mode 100644
index 0000000..522f1bf
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/import-c/pr119761c.c
@@ -0,0 +1,4 @@
+int f119761(const char *, ...)
+{
+ return 0;
+}